fix: fix sort icon update in transpose list-table

This commit is contained in:
Rui-Sun 2024-10-18 14:38:29 +08:00
parent 81c68b3e72
commit 5f3b24f648
2 changed files with 25 additions and 6 deletions

View File

@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@visactor/vtable",
"comment": "fix: fix sort icon update in transpose list-table",
"type": "none"
}
],
"packageName": "@visactor/vtable"
}

View File

@ -507,12 +507,21 @@ export class StateManager {
column => column?.field === item?.field
);
//let path = (item as any)?.event?.path?.findLast((item:any)=>item.col!=undefined);
prev.push({
field: item.field,
order: item.order,
col: column.startInTotal,
row: column.level
} as any);
if (this.table.internalProps.transpose) {
prev.push({
field: item.field,
order: item.order,
row: column.startInTotal,
col: column.level
} as any);
} else {
prev.push({
field: item.field,
order: item.order,
col: column.startInTotal,
row: column.level
} as any);
}
return prev;
}, []);