bind default sorting function to part of the cell
bind default sorting function to part of the cell
isaacdvory
Posts: 5Questions: 2Answers: 0
Hi,
So I'm using column filtering and want to enable sort, but I made a change to the filtering, I move the filter to the first row, without cloning it, see picture attached.
My problem now is that whenever I click in the input box, it also sorts the table, how can I change that behavior?
This discussion has been closed.
Answers
You can use
orderCellsTop
for that,Colin
Thanks colin, I'm not sure that's what I need.
this function seems to accept true and false only, what I'm looking to do is leave the sort on the top cells but have the "click" bind, limited to the arrow keys and not for the whole cell
The recommended approach is to use two headers; one for sorting and the other for searching. See this thread for examples of both text input and select searches. The use
orderCellsTop
as Colin mentioned.Kevin
so there is no supported way to do what I want?
The order listener attaches to the
th
element. There is not a built-in way to attach only to the sorting arrows - which is what I think you are asking for. It should be possible for you to attach your own listeners to the area you want and use theorder()
API to perform the ordering.Kevin
Also see this thread asking a similar question.
Kevin