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
|
React.useEffect(() => { |
|
if (props.defaultStickyColumnName) |
|
handleStickyColumnNameChange(props.defaultStickyColumnName); |
|
}, [props.defaultStickyColumnName, props.data]); |
|
React.useEffect(updateColumnNames, [props.data, stickyColumnName]); |
which causes the issue in this logic
|
handleStickyColumnNameChange: (columnName) => |
|
set((draft) => { |
|
if (!draft.columnNames.includes(columnName)) return; |
|
draft.stickyColumnName = columnName; |
|
}), |
Thanks for this awesome library! I noticed that
defaultStickyColumnNamewas not being respected when testing it out.Here's a codesandbox repro https://codesandbox.io/s/dazzling-cray-bjmjs
It seems like
columnNamesis updated afterhandleStickyColumnNameChangeflat-ui/src/components/grid.tsx
Lines 168 to 171 in 07b88ec
flat-ui/src/components/grid.tsx
Line 183 in 07b88ec
which causes the issue in this logic
flat-ui/src/store.ts
Lines 86 to 90 in 07b88ec