Is there a way to manually trigger sort from a button outside table?

Tags: #<Tag:0x00007fa98d481078>

Hi,

I just want to ask if there is a way to trigger manually sorting by clicking a button outside the table? For example, I want to sort column 2, I just want to click a button then manually trigger the sort for that column.

Hi @hugh

Yes, you can achieve your goal by using our API.
Here is a demo - https://jsfiddle.net/r48jfh6c/

Does it follow your idea?

Hi @piotr.nowak,

Thanks so much for that demo. Can I add another question cause it is somehow related - is there a way to trigger filter outside the table as well? Just like we did for the sorting? Like adding our own inputs, then if click “Filter” it will then apply it to the table?

Yes, of course, you can.

You need to use our API. Here is a link to our docs about filters plugin - https://handsontable.com/docs/7.4.2/Filters.html

And here is an example of custom implementation filters - https://handsontable.com/docs/7.4.2/demo-filtering.html#custom-implementations

Wow, thanks so much for the quick response! I think this ticket is already answered.