-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Labels
Description
Use case
Hello: steps to reproduce:
- Open https://adazzle.github.io/react-data-grid/#/row-grouping. Uncheck Country and Year checkboxes and check Athlete.
- In our
RawColumnsConfigathletehas index 4. If we froze that column or group by it and resize - insideonColumnResizewe are gettingidx=1, which is obviously the viewport column index. - In my case I'm saving user table configuration to my backend and if I will use
idx=1to save column width - I will save it to wrong column (countryin this case), because in myRawColumnConfiganother column at that index
I dont sure that its a bug that we are getting viewport index, so i dont think we need to change idx calculated to pass inside onColumnResize
Proposed solution
I suggest also pass the column object to onColumnResize callback. With that object we can easily define column by 'key'
krinoid