Sorting doesn't work if custom header component
aleksei-baryshnikov opened this issue · comments
If using a custom header cell component then it won't work.
Example:
https://stackblitz.com/edit/table-custom-header-cell-ts-a3crzg?file=Demo.tsx
Hi @aleksei-baryshnikov
headCell
overrides the whole head component and its behavior
you have 2 ways to make it work:
- use
headCellContent
instead https://stackblitz.com/edit/table-custom-header-cell-ts-vkmq6n?file=Demo.tsx
OR - add
onClick
and dispatch the required action: https://stackblitz.com/edit/table-custom-header-cell-ts-xfhmuf?file=Demo.tsx
best regards