You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In our RawColumnsConfigathlete has index 4. If we froze that column or group by it and resize - inside onColumnResize we are getting idx=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=1 to save column width - I will save it to wrong column (country in this case), because in my RawColumnConfig another 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'
I have a scenario where I expand/collapse grouped columns into a single column, this affects the indexing on onColumnResize.
If possible a key instead of the index as suggested by @kokosin4ik would be great.
Use case
Hello: steps to reproduce:
RawColumnsConfig
athlete
has index 4. If we froze that column or group by it and resize - insideonColumnResize
we are gettingidx=1
, which is obviously the viewport column index.idx=1
to save column width - I will save it to wrong column (country
in this case), because in myRawColumnConfig
another column at that indexI 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 toonColumnResize
callback. With that object we can easily define column by 'key'#3330
The text was updated successfully, but these errors were encountered: