Skip to content

Commit

Permalink
fix: fix sort icon update in merge cell
Browse files Browse the repository at this point in the history
  • Loading branch information
Rui-Sun committed Oct 12, 2024
1 parent ebceb5e commit 6345d76
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@visactor/vtable",
"comment": "fix: fix sort icon update in merge cell",
"type": "none"
}
],
"packageName": "@visactor/vtable"
}
3 changes: 2 additions & 1 deletion packages/vtable/src/state/state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1274,7 +1274,8 @@ export class StateManager {
// 执行sort
dealSort(col, row, this.table as ListTableAPI, event);

const currentSortItem = this.sort.find(item => item.col === col && item.row === row);
const range = this.table.getCellRange(col, row);
const currentSortItem = this.sort.find(item => item.col === range.start.col && item.row === range.start.row);

const oldSortCol = this.table.internalProps.multipleSort || !previousSortItem ? null : previousSortItem.col;
const oldSortRow = this.table.internalProps.multipleSort || !previousSortItem ? null : previousSortItem.row;
Expand Down

0 comments on commit 6345d76

Please sign in to comment.