diff --git a/packages/core/client/src/block-provider/TableBlockProvider.tsx b/packages/core/client/src/block-provider/TableBlockProvider.tsx index 7829612acb..6663c512b8 100644 --- a/packages/core/client/src/block-provider/TableBlockProvider.tsx +++ b/packages/core/client/src/block-provider/TableBlockProvider.tsx @@ -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) {