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();
|
ctx.service.refresh();
|
||||||
},
|
},
|
||||||
onChange({ current, pageSize }, filters, sorter) {
|
onChange({ current, pageSize }, filters, sorter) {
|
||||||
const sort = sorter.order
|
const sort = sorter.order ? (sorter.order === `ascend` ? [sorter.field] : [`-${sorter.field}`]) : globalSort;
|
||||||
? sorter.order === `ascend`
|
|
||||||
? [sorter.field]
|
|
||||||
: [`-${sorter.field}`]
|
|
||||||
: globalSort || ctx.service.params?.[0]?.sort;
|
|
||||||
ctx.service.run({ ...ctx.service.params?.[0], page: current, pageSize, sort });
|
ctx.service.run({ ...ctx.service.params?.[0], page: current, pageSize, sort });
|
||||||
},
|
},
|
||||||
onClickRow(record, setSelectedRow, selectedRow) {
|
onClickRow(record, setSelectedRow, selectedRow) {
|
||||||
|
Loading…
Reference in New Issue
Block a user