This button is configured per table. You can find this option by going to:
Tables section
Select a table
Go to the User Actions section
Enable the Sort button toggle
In the Sort Fields on Portal section, you can select specific fields that users can sort by. If you leave this section empty, all fields will be available for sorting.