Code Monkey home page Code Monkey logo

vue-datagrid's Introduction

๐Ÿšจ Repository Notice ๐Ÿšจ

This repo is read-only and will be deprecated in v5+ in favor of monorepos. Post issues here. Happy coding! ๐Ÿ–ฅ๏ธ๐Ÿ’ป


RevoGrid

Latest Version on NPM Software License Tree shaking Tree shaking

Powerful data grid component built with StencilJS.

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

Material grid preview

RevoGrid material theme.

Key Features

  • High Performance: Handles millions of cells in the viewport with a powerful core built by default.

  • Keyboard Support:

    • Excel-like focus for efficient navigation and editing.
    • Seamless copy/paste from Excel, Google Sheets, or any other sheet format.
  • Lightweight: Minimal initial bundle size Min size. Can be imported with polyfills or as a module for modern browsers.

  • Intelligent Virtual DOM: Smart row recombination to minimize redraws.

  • Sorting: Multiple options, customizable per column, with advanced event handling.

  • Filtering:

    • Predefined system filters.
    • Preserve existing collections.
    • Custom filters to extend system filters with your own set.
  • 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:

    • Columns (define left or right).
    • Rows (define top or bottom).
  • Grouping:

    • Column grouping (nested headers).
    • Row grouping (nested rows).
  • Cell Editing: In-place editing of cell data.

  • Customizations:

    • Column header template.
    • Row header template.
    • Cell template (create your own cell views).
    • Cell editor (use predefined or apply your own custom editors and cell types).
    • Cell properties (define custom properties for rendered cells).
  • Column Types: More details

    • Text/String (default).
    • Number.
    • Select.
    • Date.
    • Custom (create extended styles using any template).
  • Drag and Drop: Easily reorder rows.

  • Range Operations:

    • Selection.
    • Editing.
  • Theme Packages:

    • Excel-like (default).
    • Material (compact, dark, or light).
  • 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.


Usage Vue 2

With NPM:

npm i @revolist/vue-datagrid --save;

With Yarn:

yarn add @revolist/vue-datagrid;
// App.vue

<template>
  <!-- Use the VGrid component and bind the data source and columns -->
  <v-grid :source="rows" :columns="columns" />
</template>

<script>
import Grid, { VGridVueTemplate } from '@revolist/vue-datagrid'; // Import the VGrid component
import Cell from './Cell.vue'; // Custom cell template

export default {
  name: 'App',
  data() {
    return {
      // Define the columns for the grid
      columns: [
        { prop: 'name', name: 'First' }, // Simple column definition
        { prop: 'details', cellTemplate: VGridVueTemplate(Cell) }, // Another column definition
      ],
      // Define the data source for the grid
      rows: [{ name: '1', details: 'Item 1' }],
    };
  },
  components: {
    VGrid, // Register the VGrid component
  },
};
</script>
// Cell.vue
<template>Custom cell</template>
<script>
import Vue, { PropType } from 'vue';
export default {
  props: ['prop', 'model', 'column', 'rowIndex', 'colIndex', 'colType', 'type', 'data'],
};
</script>

Example and guide

Versions

  • 2.0+: Introduced the plugin system, grouping, sorting, and filtering.

  • 3.0+: Breaking changes introduced:

    • Removed the redundant viewport component.
    • Renamed classes to support Bootstrap and other libraries:
      • row -> rgRow
      • col -> rgCol
      • data-cell -> rgCell
      • data-header-cell -> rgHeaderCell
    • Migrated all method names to lowercase to align with modern event naming conventions. For example, afterEdit is now afteredit. Check the API for details.
    • Added support for pure ESM modules to enable the use of the grid in all modern frontend tooling like Vite, Parcel, etc. You can now import custom elements without lazy loading. Note that you are responsible for polyfills.
  • 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 }].

    • Updated event naming convention. Review your event usage. Event names are all lowercase now and are aligned with modern event naming conventions. For example, afterEdit -> afteredit.
    • Multiple event breaking changes introduced: beforerowrender now returns BeforeRowRenderEvent. Check all events for details.
  • Major improvements:

    • Rethought the entire framework approach. Introduced Pro version with advance support and pro features.
    • Introduced slot support.
    • Updated scrolling system for better mobile support.
    • Advance template support. Introduced additionalData for templates and editors. Prop gives access to parent/root app context.
    • Redesigned the documentation.
    • Fixed major issues and significantly improved overall performance, making the grid multiple time faster.
    • Enhanced plugin support - now with full access to grid providers.
    • Updated documentation.
    • Provided full framework support and native render for Angular, React, Svelte and Vue.

Our Sponsors

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.

Altruistiq

Become a Sponsor

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.

Sponsor Us

Thank you for supporting RevoGrid! ๐Ÿ™

Contributing

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.

Why Contribute?

  • Expand Your Knowledge: Working on RevoGrid allows you to dive deep into modern web technologies, improve your coding skills, and learn best practices in performance optimization, data handling, and component-based architecture.
  • Valuable Experience: Contributing to an open-source project like RevoGrid provides you with practical experience that can be a great addition to your portfolio. It demonstrates your ability to work collaboratively, solve complex problems, and contribute to a project's success.
  • Professional Growth: By contributing, you become part of a network of talented developers. This can lead to mentorship opportunities, collaborations, and professional connections that can benefit your career.
  • Make a Difference: Your contributions can help improve RevoGrid, making it more powerful and user-friendly for developers around the world. Your input can shape the future of the project and drive innovation.

Join Us

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!

License

MIT


vue-datagrid's People

Contributors

danvue avatar dependabot[bot] avatar github-actions[bot] avatar leyenda avatar m2a2x avatar revolist avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.