Skip to content

Commit

Permalink
fix: tree and rollup default to non-sortable (#1404)
Browse files Browse the repository at this point in the history
Closes #1402
  • Loading branch information
ethanalvizo authored Jul 10, 2023
1 parent ba13c91 commit 5a8f34d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 0 additions & 4 deletions packages/iris-grid/src/IrisGridTableModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -269,10 +269,6 @@ class IrisGridTableModel extends IrisGridTableModelTemplate<Table, UIRow> {
return this.frozenColumns.includes(this.columns[modelIndex].name);
}

isColumnSortable(modelIndex: ModelIndex): boolean {
return this.columns[modelIndex].isSortable ?? true;
}

async delete(ranges: GridRange[]): Promise<void> {
if (!this.isDeletableRanges(ranges)) {
throw new Error(`Undeletable ranges ${ranges}`);
Expand Down
4 changes: 4 additions & 0 deletions packages/iris-grid/src/IrisGridTableModelTemplate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1581,6 +1581,10 @@ class IrisGridTableModelTemplate<
return !this.isKeyColumn(modelIndex);
}

isColumnSortable(modelIndex: ModelIndex): boolean {
return this.columns[modelIndex].isSortable ?? true;
}

isKeyColumn(x: ModelIndex): boolean {
return x < (this.inputTable?.keyColumns.length ?? 0);
}
Expand Down

0 comments on commit 5a8f34d

Please sign in to comment.