-
Notifications
You must be signed in to change notification settings - Fork 25
Closed
Description
Thanks for this awesome library! I noticed that defaultStickyColumnName was not being respected when testing it out.
Here's a codesandbox repro https://codesandbox.io/s/dazzling-cray-bjmjs
It seems like columnNames is updated after handleStickyColumnNameChange
flat-ui/src/components/grid.tsx
Lines 168 to 171 in 07b88ec
| React.useEffect(() => { | |
| if (props.defaultStickyColumnName) | |
| handleStickyColumnNameChange(props.defaultStickyColumnName); | |
| }, [props.defaultStickyColumnName, props.data]); |
flat-ui/src/components/grid.tsx
Line 183 in 07b88ec
| React.useEffect(updateColumnNames, [props.data, stickyColumnName]); |
which causes the issue in this logic
Lines 86 to 90 in 07b88ec
| handleStickyColumnNameChange: (columnName) => | |
| set((draft) => { | |
| if (!draft.columnNames.includes(columnName)) return; | |
| draft.stickyColumnName = columnName; | |
| }), |
Wattenberger
Metadata
Metadata
Assignees
Labels
No labels