Examples
Sorting State Managed
The sort state is kept in React state outside the table and passed back in. The table sorts the same as with its own state.
Try it
- Click
First Nameand chooseSort ascending. AFirst Namechip appears. - Click
First Nameagain and chooseClear sort. The chip goes away.
Related guides
Sort Ranking
The table starts sorted by First Name with fuzzy sorting and shows row numbers. While a search is active, the closest First Name matches come first.
Clear Sort Stays Cleared
A small pet table with a Re-render button above it. Once a sort is cleared, the rows stay in their first order, also after the page re-renders.