I've been having trouble building something using the grid.
I have several requirements:
- A grouped table or grid with three levels, having about 50 rows with six to eight numeric columns of percents.
- Sums (aggregates) of the columns at the top level and the second level.
- All of the numeric value cells should be in-cell editable.
- Editing the numeric value cells should update the aggregate numbers.
- Formatting and validation for values should be enforced: cells may only contain values from 0.00% to 100.00% to two decimal places.
I know that's a lot - we *might* be able to flex on the last three, but it would be preferred not to.
My issue is that updating a value updates the Grid's `data` prop, and the implementations I've tried so far seem to have one or two issues:
1) The input delay is quite large (calls to update the row onItemChange recalculate aggregates on every input). Recalculating and changing the state hook for the Grid's `data` prop takes noticeable time.
2) When using a custom cell via `cells={{}}`, updating causes the input to lose focus. If one enters a value and hits the Tab key to focus the next (custom) cell input, updating the Grid's `data` prop causes the Grid to be redrawn. I'm passing `dataItemKey` to the Grid component, and each custom cell has set `key={id}`, but the focus is lost regardless.
I would appreciate any input you could provide, including "You should use <<other thing>>".