Sort a column of the antd Table component after custom rendering.

The custom rendering content of the name column in the

Table table. Sorter is set to true sortable, dataIndex is empty;
after clicking to sort, this column cannot be sorted, and there are no parameters.
{
title: "name",
dataIndex:"",
sorter: true,
render: (text) = > {
const name = text.name = = null? deleted : text.name;
return name;
}

May.22,2021

Please read the document
clipboard.png
if it is not server sorting, the front end should write its own function sorting

.
sorter: (a, b) => a- b,//

dataIndex must be set, and is unique .

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e90e6f-1311.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e90e6f-1311.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?