-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Description
Hi,
This is more my issue than a problem with the control. I'm a complete newby to React and Typescript and have found this control and the examples to be excellent. However, I have been going round in circles with an issue I am really struggling to solve.
Basically Users of my grid can choose their own columns to display using a panel to the right of the grid. This fires off a useMemo hook, to generate the columns and assign them to the columns array for the grid. However once these columns have been added, the users would like to reorder them without having to re-pick them.
I have been following the columnsreordering example, which has static/fixed columns, and can see how the memo works to update the column state.
The problem I have is that when I reorder the columns, the columns do not reorder. This is because I can't put the columns into a state variable, as they are generated in the memo. Is there an example that could be put together to show me how to do this please?
I can share my code offline if required.
Thanks
Steve