mirror of
https://github.com/VisActor/VTable
synced 2024-11-22 01:52:03 +00:00
fix: sortState field undefined occor error
This commit is contained in:
parent
cd53c18c58
commit
a661d97cc9
@ -1112,8 +1112,10 @@ export class ListTable extends BaseTable implements ListTableAPI {
|
||||
|
||||
//重复逻辑抽取updateWidthHeight
|
||||
if (sort !== undefined) {
|
||||
this.internalProps.sortState = this.internalProps.multipleSort ? (Array.isArray(sort) ? sort : [sort]) : sort;
|
||||
this.stateManager.setSortState((this as any).sortState as SortState);
|
||||
if ((!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);
|
||||
}
|
||||
}
|
||||
if (records) {
|
||||
_setRecords(this, records);
|
||||
|
@ -519,15 +519,15 @@ export class StateManager {
|
||||
prev.push({
|
||||
field: item.field,
|
||||
order: item.order,
|
||||
row: column.startInTotal + this.table.internalProps.layoutMap.leftRowSeriesNumberColumnCount ?? 0,
|
||||
col: column.level
|
||||
row: column?.startInTotal + this.table.internalProps.layoutMap.leftRowSeriesNumberColumnCount ?? 0,
|
||||
col: column?.level
|
||||
} as any);
|
||||
} else {
|
||||
prev.push({
|
||||
field: item.field,
|
||||
order: item.order,
|
||||
col: column.startInTotal + this.table.internalProps.layoutMap.leftRowSeriesNumberColumnCount ?? 0,
|
||||
row: column.level
|
||||
col: column?.startInTotal + this.table.internalProps.layoutMap.leftRowSeriesNumberColumnCount ?? 0,
|
||||
row: column?.level
|
||||
} as any);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user