Skip to content

Commit

Permalink
fix: column sort works for hidden
Browse files Browse the repository at this point in the history
  • Loading branch information
Domino987 committed Feb 10, 2022
1 parent 2d1da8d commit b32d3bd
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/utils/data-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,10 @@ export default class DataManager {
// get the effective start and end considering hidden columns
const sorted = this.columns
.sort((a, b) => a.tableData.columnOrder - b.tableData.columnOrder)
.filter((column) => column.tableData.groupOrder === undefined);
.filter(
(column) =>
column.tableData.groupOrder === undefined && !column.hidden
);
let numHiddenBeforeStart = 0;
let numVisibleBeforeStart = 0;
for (
Expand Down Expand Up @@ -1057,7 +1060,7 @@ export default class DataManager {
pointer = pointer.tableData.childRows;
}
if (Array.isArray(pointer)) {
pointer = pointer.find(p => p.tableData.uuid === pathPart);
pointer = pointer.find((p) => p.tableData.uuid === pathPart);
}
});
pointer.tableData.markedForTreeRemove = true;
Expand Down

0 comments on commit b32d3bd

Please sign in to comment.