Show HN: Griddle 1.0 – A customizable datagrid component for React
griddlegriddle.github.io
griddlegriddle.github.io
- The 'Platonic Ideal' data grid implements 100% of all features that could ever be needed of a datagrid.
- All implementations of the Platonic Ideal only implement between 50% and 70% of the features.
- Your requirements cover somewhere between 60% to 80% of the features exposed by the Platonic Ideal.
- The set of features you need vs those that are provided by the available datagrids are disjoint, implementing the remaining required features is a hellscape of custom extensions...
There should be a language and famework independent course about building those things, so you can build your own with the needed features quickly.
I have spent the past few months looking at a variety of grids in react. The requirements for my grid were
1) drag and drop update columns (like excel) 2) editable single cells 3) column sorts 4) column resize 5) searchable table 6) column level search 7) double click column resize (like excel)
I obviously was not able to find any that did of these things well. I started out looking at / modifying the code for:
adazzle.github.io/react-data-grid/examples.html#/all-features
But quickly realize the horizontal/vertical scroll performance was horrible on OSX Chrome. I ended up using facebook fixed-data-grid. Unfortunately they are no longer maintaining it but I am using this fork:
https://github.com/schrodinger/fixed-data-table-2
I have had two problems with fixed-data-grid, and the performance is awesome. It is very easy to extend.
For others that want a comparison, here's a writeup that explores the pros/cons of various React grid/table libs [1].
[0]: https://github.com/bvaughn/react-virtualized
[1]: https://techblog.commercetools.com/advanced-data-tables-in-r...
https://www.meetup.com/Detroit-React-Developers-Meetup/event...
Trying to display data that is computed (think Excel formulas) with react-data-grid and others is very complicated. I still am not satisfied with my current use of weird memoized selectors and a custom table.
<Griddle data={fakeData}> <RowDefinition> <ColumnDefinition id="id" /> <ColumnDefinition id="name" /> <ColumnDefinition id="somethingTotallyMadeUp" title="New value" customComponent={connectedCustomComponent} /> </RowDefinition> </Griddle>
From there, you can basically render whatever you want from the made-up column (but have access to everything in the row to base it on). See the following for connecting a custom component to Griddle's state management:
https://github.com/GriddleGriddle/Griddle/blob/master/storie...
and
https://github.com/GriddleGriddle/Griddle/blob/master/storie...
https://datatables.net/examples/basic_init/zero_configuratio...
But with a bit of hacking it worked good enough.
When it comes to enterprise internal apps, the competition is pretty terrible, so you can mop up the field even when shipping something that'd be considered terrible bloated for a SaaS or consumer facing app.