[DataTable] How I can add custom icon in table caption? #1721
-
Hello, is there any way to add a custom icon to the header of a table column with a click event and so that it does not trigger the sorting click? and how I can catch a click on the sorting icon to do my own sorting? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hi @Hoviadin,
The
Could you please describe more clearly what you need to do? Because usually sorting performed by the DataSources, for example for |
Beta Was this translation helpful? Give feedback.
Hi @Hoviadin,
The
caption
prop in columns configuration can acceptReactNode
type, so you can try to provide a react component which will contain your icon + caption text. To not trigger sorting action, just add e.stopPropagation in you custom icon click.Could you please describe more clearly what you need to do? Because usually sorting performed by the DataSources, for example for
LazyDataSource
current sorting value passed to the api callback and should be send to the server.…