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
I have a sortable table that needs to auto select first row even after sorting. I am using v7 and was able to auto select first row on initial load by initialState.selectedRowIds:{'0':true}
However, after sorting, the original row remains selected instead of the first row of sorted table.
I have tried adding selectedRowIds in useControlledState as below but that's not working. useControlledState: state => { return useMemo( () => ({ ...state, selectedRowIds:{'0':true} }), [state] );
Any help will be greatly appreciated. Thanks in advance
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I have a sortable table that needs to auto select first row even after sorting. I am using v7 and was able to auto select first row on initial load by
initialState.selectedRowIds:{'0':true}
However, after sorting, the original row remains selected instead of the first row of sorted table.
I have tried adding selectedRowIds in useControlledState as below but that's not working.
useControlledState: state => { return useMemo( () => ({ ...state, selectedRowIds:{'0':true} }), [state] );
Any help will be greatly appreciated. Thanks in advance
Beta Was this translation helpful? Give feedback.
All reactions