Skip to content

Commit

Permalink
fix: Tweak setupColumnSort() to fix exception when a no longer existi…
Browse files Browse the repository at this point in the history
…ng column is in the sort list. Fixes #1015
  • Loading branch information
6pac committed Apr 25, 2024
1 parent 24fa702 commit 93b5bf8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/slick.grid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1801,8 +1801,9 @@ export class SlickGrid<TData = any, C extends Column<TData> = Column<TData>, O e
multiColumnSort: true,
previousSortColumns,
sortCols: this.sortColumns.map((col) => {
return { columnId: this.columns[this.getColumnIndex(col.columnId)].id, sortCol: this.columns[this.getColumnIndex(col.columnId)], sortAsc: col.sortAsc };
})
const tempCol = this.columns[this.getColumnIndex(col.columnId)];
return !tempCol ? null : { columnId: tempCol.id, sortCol: tempCol, sortAsc: col.sortAsc };
}).filter((el) => el)
};
}

Expand Down

0 comments on commit 93b5bf8

Please sign in to comment.