fix: setRecord set sortSate is null

This commit is contained in:
fangsmile 2024-11-14 11:36:53 +08:00
parent c5bfb361e8
commit 52d64450b7

View File

@ -1118,7 +1118,7 @@ export class ListTable extends BaseTable implements ListTableAPI {
//重复逻辑抽取updateWidthHeight
if (sort !== undefined) {
if ((!Array.isArray(sort) && isValid(sort.field)) || Array.isArray(sort)) {
if (sort === null || (!Array.isArray(sort) && isValid(sort.field)) || Array.isArray(sort)) {
this.internalProps.sortState = this.internalProps.multipleSort ? (Array.isArray(sort) ? sort : [sort]) : sort;
this.stateManager.setSortState((this as any).sortState as SortState);
}