fix: table column sort params should support cancel sort (#3372)
* fix: sort params * fix: sort params
This commit is contained in:
parent
57a2bac72a
commit
dfb4421484
@ -174,11 +174,7 @@ export const useTableBlockProps = () => {
|
||||
ctx.service.refresh();
|
||||
},
|
||||
onChange({ current, pageSize }, filters, sorter) {
|
||||
const sort = sorter.order
|
||||
? sorter.order === `ascend`
|
||||
? [sorter.field]
|
||||
: [`-${sorter.field}`]
|
||||
: globalSort || ctx.service.params?.[0]?.sort;
|
||||
const sort = sorter.order ? (sorter.order === `ascend` ? [sorter.field] : [`-${sorter.field}`]) : globalSort;
|
||||
ctx.service.run({ ...ctx.service.params?.[0], page: current, pageSize, sort });
|
||||
},
|
||||
onClickRow(record, setSelectedRow, selectedRow) {
|
||||
|
Loading…
Reference in New Issue
Block a user