Skip to content

Commit

Permalink
fix: Fallback for change of columns
Browse files Browse the repository at this point in the history
  • Loading branch information
Domino987 committed Jun 19, 2021
1 parent ff96bae commit d430265
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/utils/data-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,10 @@ export default class DataManager {
}

sortList(list) {
const columnDef = this.columns.find((_) => _.tableData.id === this.orderBy);
let columnDef = this.columns.find((_) => _.tableData.id === this.orderBy);
if (!columnDef) {
columnDef = this.columns[0];
}
let result = list;

if (columnDef.customSort) {
Expand Down

0 comments on commit d430265

Please sign in to comment.