React Datatable column sorting?

I’m using the React UI DataTable to display some data. Each column has up and down arrows next to the header for sorting, but clicking them does nothing.

Looking at the @cuba-platform/react-ui code, I see the “enableSorter: true” setting in the javascript datatable.render() function, but I don’t see any implementation of the actual “sorter” or sort functions (string, number, date).

Is sorting implemented yet or do I need to build it myself?

FYI - here’s a link to one implementation method: https://www.aleksandrhovhannisyan.com/blog/dev/sorting-ant-design-tables/

As a follow up, I was wrong in that clicking on the header for each column does create an ascending sort on that column. However, clicking again does not change to descending as you might expect.

Any suggestions on how to debug?

Hi @eraskin,

Sorting should work out of the box.

sorting

Could you please share a minimal reproducible example?

For history, solution is in this discussion: React pagination page number icons not working - #12 от пользователя v.pushkin - CUBA.Platform