score:0

const [sort, setSort] = useState('ascend');

{
      title: 'Age',
      dataIndex: 'age',
      key: 'age',
      sorter: (a, b) => a.age - b.age,
      sortOrder: sort,
      onHeaderCell: () => ({
        onClick: () => setSort(sort === 'ascend' ? 'descend' : 
      'ascend'),       
      sortDirections: ['ascend', 'descend', 'ascend'],
      }),
},

Related Query

More Query from same tag