All Projects β†’ energydrink9 β†’ Functional Data Grid

energydrink9 / Functional Data Grid

Licence: mit
Data grids in functional style with ReactJS

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Functional Data Grid

Tui.grid
πŸžπŸ”‘ The Powerful Component to Display and Edit Data. Experience the Ultimate Data Transformer!
Stars: ✭ 1,859 (+1387.2%)
Mutual labels:  excel, spreadsheet, grid, datagrid
Angular Handsontable
Angular Data Grid with Spreadsheet Look & Feel. Official Angular wrapper for Handsontable.
Stars: ✭ 175 (+40%)
Mutual labels:  excel, spreadsheet, grid, data-grid
React Spreadsheet Grid
An Excel-like grid component for React with custom cell editors, performant scroll & resizable columns
Stars: ✭ 996 (+696.8%)
Mutual labels:  excel, spreadsheet, grid, data-grid
React Handsontable
React Data Grid with Spreadsheet Look & Feel. Official React wrapper for Handsontable.
Stars: ✭ 511 (+308.8%)
Mutual labels:  excel, spreadsheet, grid, data-grid
Revogrid
Powerful virtual data grid smartsheet with advanced customization. Best features from excel plus incredible performance πŸ”‹
Stars: ✭ 1,870 (+1396%)
Mutual labels:  excel, grid, datagrid, data-grid
Hot Table
Handsontable - Best Data Grid Web Component with Spreadsheet Look and Feel.
Stars: ✭ 114 (-8.8%)
Mutual labels:  excel, spreadsheet, grid, data-grid
Nghandsontable
Official AngularJS directive for Handsontable
Stars: ✭ 438 (+250.4%)
Mutual labels:  excel, spreadsheet, grid, data-grid
Vue Handsontable Official
Vue Data Grid with Spreadsheet Look & Feel. Official Vue wrapper for Handsontable.
Stars: ✭ 751 (+500.8%)
Mutual labels:  excel, spreadsheet, grid, data-grid
Handsontable
JavaScript data grid with a spreadsheet look & feel. Works with React, Angular, and Vue. Supported by the Handsontable team ⚑
Stars: ✭ 16,059 (+12747.2%)
Mutual labels:  excel, spreadsheet, data-grid
react-datasheet-grid
An Airtable-like / Excel-like component to create beautiful spreadsheets.
Stars: ✭ 227 (+81.6%)
Mutual labels:  grid, excel, spreadsheet
Awesome Grid
A curated list of grid(table) libraries and resources that developers may find useful.
Stars: ✭ 1,142 (+813.6%)
Mutual labels:  spreadsheet, grid, datagrid
dynamic-table
Dynamic Table jQuery Plug-in - A table that can be sorted, filtered and edited, similar to common spreadsheet application.
Stars: ✭ 26 (-79.2%)
Mutual labels:  grid, spreadsheet, data-grid
Yii2 Export
A library to export server/db data in various formats (e.g. excel, html, pdf, csv etc.)
Stars: ✭ 153 (+22.4%)
Mutual labels:  excel, spreadsheet, grid
Grid
Declarative React Canvas Grid primitive for Data table, Pivot table, Excel Worksheets and more πŸ’₯
Stars: ✭ 573 (+358.4%)
Mutual labels:  spreadsheet, grid, datagrid
svelte-datagrid
Svelte data grid spreadsheet best best features and performance from excel
Stars: ✭ 48 (-61.6%)
Mutual labels:  grid, spreadsheet, datagrid
Reactgrid
Add spreadsheet-like behavior to your React app
Stars: ✭ 289 (+131.2%)
Mutual labels:  excel, spreadsheet, datagrid
ag-grid
The best JavaScript Data Table for building Enterprise Applications. Supports React / Angular / Vue / Plain JavaScript.
Stars: ✭ 8,743 (+6894.4%)
Mutual labels:  grid, excel, datagrid
Jqwidgets
Angular, Vue, React, Web Components, Blazor, Javascript, jQuery and ASP .NET Framework,
Stars: ✭ 227 (+81.6%)
Mutual labels:  grid, datagrid, data-grid
Reogrid
Fast and powerful .NET spreadsheet component, support data format, freeze, outline, formula calculation, chart, script execution and etc. Compatible with Excel 2007 (.xlsx) format and working on .NET 3.5 (or client profile), WPF and Android platform.
Stars: ✭ 532 (+325.6%)
Mutual labels:  excel, spreadsheet, grid
Sheetjs
πŸ“— SheetJS Community Edition -- Spreadsheet Data Toolkit
Stars: ✭ 28,479 (+22683.2%)
Mutual labels:  excel, spreadsheet, grid

Functional Data Grid

npm version NPM license npm Build Status codecov Language grade: JavaScript Backers on Open Collective Sponsors on Open Collective Greenkeeper badge

This is a library made with React and React-Virtualized for creating rich data grids with filtering, sorting, grouping and aggregates computation. It supports virtualization, and so it can handle very large amounts of data. It features also locked columns, custom renderers, multi-column headers, columns resize, hide / show columns and variable rows height. Filtering, sorting, grouping and aggregates computation are done client-side.

Functional Data Grid is written in functional programming style with ES2016 and Flow. It's really fast and is being used in production with tens of thousands of elements.

Installation

You can install the library with NPM:

npm install –-save functional-data-grid

or with YARN:

yarn add functional-data-grid

Usage

To use Functional Data Grid, you have to import the library and its base types you intend to use, for example:

import FunctionalDataGrid, { Column, Group } from 'functional-data-grid'

then you can use it inside your component. For example:

import React from 'react'
import FunctionalDataGrid, { Column } from 'functional-data-grid'

let columns = [
  new Column({
    id : 'name',
    title: 'Name',
    width: 120,
    valueGetter: e => e.name
  }),
  new Column({
    id : 'surname',
    title: 'Surname',
    width: 120,
    valueGetter: e => e.surname
  })
]

let data = [
  {
    'name': 'Donald',
    'surname': 'Duck'
  },
  {
    'name': 'Mickey',
    'surname': 'Mouse'
  }
]

class MyGrid extends React.Component {

  render = () => <FunctionalDataGrid columns={columns} data={data} />

}

Component Props

The FunctionalDataGrid component accepts the following props:

Prop Required / optional Default Description
columns required An array of Column with columns definitions
columnGroups optional An array of ColumnGroup with column group definitions
data required An array of elements to show in the grid, one per row
initialFilter optional No filters An array of Filter to filter the elements
initialSort optional No sorting An array of Sort to sort the elements
groups optional No grouping An array of Group to specify grouping of the elements
aggregatesCalculator optional No aggregates A function to compute the aggregates from an array of elements
style optional {} Allows to specify additional styles for the grid: accepts an object with the optional properties grid, cell, header, row. Row must be a function that accepts a DataRow and returns an Object, the other properties are plain Objects
rowHeight optional 26 The height of the rows or a function that accepts an element and returns its row height
height optional 100% The height of the FunctionalDataGrid component div (unit of measurement needed, f.e.: 800px)
showGroupHeaders optional true Set to false to hide the headers for groups
includeFilteredElementsInAggregates optional false It allows to calculate the aggregates based on all the elements, also the filtered ones
onColumnResize optional Allows to specify an event handler for the column resize event
onColumnVisibilityChange optional Allows to specify an event handler for the column visibility change event
onColumnsOrderChange optional Allows to specify an event handler for the column order change event
showFooter optional true Shows the footer of the grid with the elements count
enableColumnsShowAndHide optional false Allows the user to show and hide columns
enableColumnsSorting optional false Allows the user to change the order of the columns
overscanRowCount optional 10 Number of rows to render above/below the visible bounds of the grid
className optional '' Css classes to apply to the component

Columns definition

Columns are defined by creating an instance of the class Column. Column constructor accepts an object with the following keys:

Key Required / optional Default Description
id required A unique id for the column
title optional empty The title shown on the column header
filterable optional false Enables filtering on this column
sortable optional false Enables sorting on this column
resizable optional true Enables resizing for this column
locked optional false Locks the column so that it doesn’t disappear on scrolling
hidden optional false Hides the column
width optional The width of the column
valueGetter required Specifies how to get the value to show in the column from the original row element
aggregateValueGetter optional Specifies how to get the value to show in the column from the aggregate row element
renderer optional v => v Specifies how to render the column value
aggregateRenderer optional = renderer Specifies how to render the aggregate column value
filterRenderer optional Specifies how to render the filter in the header
headerRenderer optional (column) => column.title Specifies how to render the header
headerStyle optional {} Allows to specify additional styles for the column header
style optional {} Allows to specify additional styles for the column
comparator optional (a, b) => a === b ? 0 : a < b ? -1 : 1 Specifies a comparator for the sorting function
columnGroup optional null The id of the column's column group
enableShowAndHide optional true Allows the user to show and hide column

Groups definition

Groups are defined by creating an instance of the class Group. Group constructor accepts an object with the following keys:

Key Required / optional Default Description
id required A unique id for the column
title optional empty The title shown on the group header
groupingFunction required A function that compute the takes an element and compute the corresponding key
renderer optional (v, g) => { g.title }: { v } The title shown on the group header
comparator optional (a: K, b: K) => a === b ? 0 : (a: any) < (b: any) ? -1 : 1 The comparator used to sort the groups

Demo

Check the examples here: https://energydrink9.github.io/functional-data-grid-examples

Conclusion

Pull requests are welcome, enjoy your functional data grids!

Contributors

This project exists thanks to all the people who contribute.

Backers

Thank you to all our backers! πŸ™ [Become a backer]

Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [Become a sponsor]

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].