3 ms·
I need a grid component that supports single cell value re-computation. Trying to display data that is computed (think Excel formulas) with react-data-grid and
by d0100 10y ago
I need a grid component that supports single cell value re-computation.
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.
- dengar007 10y agoI wonder if Griddle could help you out here. I think you can add a fake column that you will set up to get the entire row of data. <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/stories/index.js#L67-L71 https://github.com/GriddleGriddle/Griddle/blob/master/storie... and https://github.com/GriddleGriddle/Griddle/blob/master/stories/index.js#L145 https://github.com/GriddleGriddle/Griddle/blob/master/storie...