Default sorted column in AnalyticalTable #6383
Answered
by
Lukas742
SvetoslavZ99
asked this question in
Q&A
-
Beta Was this translation helpful? Give feedback.
Answered by
Lukas742
Sep 20, 2024
Replies: 1 comment 1 reply
-
you can use the <AnalyticalTable
{...otherProps}
reactTableOptions={{
initialState: {
columnOrder: ['age', 'name'],
filters: [{ id: 'age', value: '27' }],
groupBy: ['age'],
hiddenColumns: ['name'],
selectedRowIds: { 2: true, 5: true, '18.3': true },
sortBy: [
{
id: 'age',
desc: true,
},
], // <-- this is the option you can use
expanded: {
'18': true,
'18.3': true,
},
},
}}
/> https://stackblitz.com/edit/ui5wcr-at-initial-state?file=src%2FApp.tsx,src%2FdataTree.json |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
SvetoslavZ99
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @SvetoslavZ99
you can use the
reactTableOptions.initialState
object to achieve this.