Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
@revolist/vue3-datagrid
Advanced tools
Vue 3 DataGrid Spreadsheet component with native Vue 3 cell render support
This repo is read-only and will be deprecated in v5+ in favor of monorepos. Post issues here. Happy coding! 🖥️💻
Support Millions of cells and thousands of columns easy and efficiently for fast data rendering. Easy to use.
Demo and API • Key Features • How To Use • Installation • Docs • License
RevoGrid material theme.High Performance: Handles millions of cells in the viewport with a powerful core built by default.
Accessibility: Follows WAI-ARIA best practices.
Keyboard Support:
Lightweight: Minimal initial bundle size . Can be imported with polyfills or as a module for modern browsers.
Intelligent Virtual DOM: Smart row recombination to minimize redraws.
Virtual Scroll: Handles large datasets with infinite scroll.
Formula Support: Evaluate formulas in cell data.
Drag and Drop: Drag and drop in rows and columns.
Sorting: Multiple options, customizable per column, with advanced event handling.
Filtering:
Export: Export data to file.
Custom Sizes: Define custom sizes for columns and rows. Automatic sizing based on content.
Column Resizing: Adjust column widths.
Pinned/Sticky/Freezed Elements:
Grouping:
Cell Editing: In-place editing of cell data.
Cell Merging: Merge cells to form groups.
Customizations:
Column Types: More details
Range Operations:
Theme Packages:
Extensibility: Modern VNode features and tsx support for easy extension.
Trimmed Rows: Hide rows on demand.
Plugin System: Create custom plugins or extend existing ones easily.
Additional Customizations and Improvements: Explore hundreds of other small customizations and improvements in RevoGrid.
With NPM:
npm i @revolist/vue3-datagrid --save;
With Yarn:
yarn add @revolist/vue3-datagrid;
// App.vue
<template>
<Grid
:editors="gridEditors"
:source="source"
:columns="columns"
@cell-custom-action="testCustomCellAction"
@cell-click="testAction"
/>
</template>
<script lang="ts" setup>
/**
* This is an example of a Vue3 component using Revogrid
*/
import { provide, readonly, ref } from 'vue';
/**
* Import Revogrid, Renderer and Editor for Vue
*/
import Grid, { VGridVueEditor, VGridVueTemplate, Editors } from '@revolist/vue3-datagrid';
import Editor from './Editor.vue';
import Cell from './Cell.vue';
const count = ref(0)
provide('read-only-count', readonly(count));
const MY_EDITOR = 'custom-editor';
// Vue column editor register
const gridEditors: Editors = { [MY_EDITOR]: VGridVueEditor(Editor) };
// Define columns
const columns = [
{
prop: 'name',
name: 'First',
// editor type
editor: MY_EDITOR,
// vue cell component register
cellTemplate: VGridVueTemplate(Cell),
},
{
prop: 'details',
name: 'Second',
},
];
// Define source
const source = [
{
name: '1',
details: 'Item 1',
},
{
name: '2',
details: 'Item 2',
},
];
// For testing events
function testCustomCellAction(e: CustomEvent) {
console.log('Custom cell action', e);
}
function testAction(e: CustomEvent) {
console.log('Editor action', e);
}
</script>
// Cell.vue
<template>
<div ref="cell" @click="customCellClickEvent">{{ rowIndex }}</div>
</template>
<script lang="ts" setup>
import { defineProps, ref, inject } from 'vue';
import type { ColumnDataSchemaModel } from '@revolist/vue3-datagrid';
const props = defineProps<ColumnDataSchemaModel>();
const cell = ref<HTMLElement>();
const message = inject('sample');
function customCellClickEvent() {
console.log('Custom cell click > Injected message:', message);
const event = new CustomEvent('cell-custom-action', {
bubbles: true,
detail: { row: props.model },
});
cell.value?.dispatchEvent(event);
}
</script>
// Editor.vue
<template>
<button @click="onBtn">Finish edit</button>
</template>
<script lang="ts">
import { defineComponent } from 'vue';
export default defineComponent({
props: ['rowIndex', 'model', 'save', 'close'],
methods: {
onBtn(e: MouseEvent) {
// create and dispatch event
const event = new CustomEvent('cell', {
bubbles: true,
detail: { row: this.model },
});
this.$el.dispatchEvent(event);
e.stopPropagation();
if (typeof this.close === 'function') {
(this.close as () => void)();
}
},
},
});
</script>
2.0+: Introduced the plugin system, grouping, sorting, and filtering.
3.0+: Breaking changes introduced:
row
-> rgRow
col
-> rgCol
data-cell
-> rgCell
data-header-cell
-> rgHeaderCell
afterEdit
is now afteredit
. Check the API for details.4.0+: Breaking changes introduced. See the migration guide.
Redesigned type support:
- Removed deprecated namespaces:
- Before: RevoGrid.ColumnDataSchemaRegular
- Now: ColumnDataSchemaRegular
;
- Improved type import:
- Before: import { RevoGrid } from '@revolist/revogrid/dist/types/interfaces'
- Now: import { ColumnDataSchemaRegular } from '@revolist/revogrid'
.
- Changed viewport type names everywhere. For example, before: rowDefinitions: [{ type: "row", index: 0, size: 145 }]
, after: rowDefinitions: [{ type: "rgRow", index: 0, size: 145 }]
.
afterEdit
-> afteredit
.BeforeRowRenderEvent
. Check all events for details.Major improvements:
additionalData
for templates and editors. Prop
gives access to parent/root app context.What next?
We would like to extend our heartfelt gratitude to our sponsors for their generous support. Their contributions help us maintain and develop RevoGrid, ensuring continuous improvements and updates.
If you or your company would like to support the ongoing development of RevoGrid, please consider becoming a sponsor or use or Pro version. Your support will help us continue to improve the project and provide the best possible tool for the community.
Thank you for supporting RevoGrid! 🙏
We invite you to join our vibrant community and contribute to the growth and success of RevoGrid. By getting involved, you'll have the opportunity to enhance your skills, gain valuable experience, and make a significant impact on an innovative project.
Your contribution, no matter how big or small, is valuable. By working on RevoGrid, you'll be part of an exciting project that's making a difference in the world of data grids. Join us today and let's build something amazing together!
MIT
FAQs
Vue 3 DataGrid Spreadsheet component with native Vue 3 cell render support
The npm package @revolist/vue3-datagrid receives a total of 2,547 weekly downloads. As such, @revolist/vue3-datagrid popularity was classified as popular.
We found that @revolist/vue3-datagrid demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.