πThe sort icon should always visible π΅πΌββοΈ #4723
Answered
by
KevinVandy
ArtemFedorchuk
asked this question in
General
-
Beta Was this translation helpful? Give feedback.
Answered by
KevinVandy
Feb 22, 2023
Replies: 2 comments 3 replies
-
enableSortingRemoval: false |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
ArtemFedorchuk
-
You can handle the sort icon display based on the current sorting state and the enableSortingRemoval flag like this: // MyComponent
<td>
{/* ... */}
{
{
asc: <ArrowUpwardOutlined />,
desc: <ArrowDownwardOutlined />,
false: enableSortingRemoval ? null : <ArrowUpwardOutlined />,
}[header.column.getIsSorted() as string] || <ArrowUpwardOutlined />
}
{flexRender(header.column.columnDef.header, header.getContext())}
{/* ... */}
</td>
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
enableSortingRemoval: false