diff --git a/packages/iris-grid/src/IrisGrid.tsx b/packages/iris-grid/src/IrisGrid.tsx index 8a7d154268..3e8d1c5323 100644 --- a/packages/iris-grid/src/IrisGrid.tsx +++ b/packages/iris-grid/src/IrisGrid.tsx @@ -3198,6 +3198,7 @@ export class IrisGrid extends Component { this.setState({ rollupConfig, movedColumns: [], + frozenColumns: [], sorts: [], reverseType: TableUtils.REVERSE_TYPE.NONE, selectDistinctColumns: [], diff --git a/packages/iris-grid/src/IrisGridTreeTableModel.ts b/packages/iris-grid/src/IrisGridTreeTableModel.ts index d6de44e712..692f964c97 100644 --- a/packages/iris-grid/src/IrisGridTreeTableModel.ts +++ b/packages/iris-grid/src/IrisGridTreeTableModel.ts @@ -3,7 +3,7 @@ import memoize from 'memoize-one'; import { GridRange, ModelIndex } from '@deephaven/grid'; import { Column, TreeRow, TreeTable } from '@deephaven/jsapi-shim'; import { assertNotNull } from '@deephaven/utils'; -import { UIRow } from './CommonTypes'; +import { UIRow, ColumnName } from './CommonTypes'; import IrisGridTableModelTemplate from './IrisGridTableModelTemplate'; export interface UITreeRow extends UIRow { @@ -182,6 +182,12 @@ class IrisGridTreeTableModel extends IrisGridTableModelTemplate< ) ) ); + + updateFrozenColumns(columns: ColumnName[]): void { + if (columns.length > 0) { + throw new Error('Cannot freeze columns on a tree table'); + } + } } export default IrisGridTreeTableModel; diff --git a/packages/iris-grid/src/mousehandlers/IrisGridContextMenuHandler.tsx b/packages/iris-grid/src/mousehandlers/IrisGridContextMenuHandler.tsx index ac8f4b0434..a09ea84352 100644 --- a/packages/iris-grid/src/mousehandlers/IrisGridContextMenuHandler.tsx +++ b/packages/iris-grid/src/mousehandlers/IrisGridContextMenuHandler.tsx @@ -236,7 +236,8 @@ class IrisGridContextMenuHandler extends GridMouseHandler { columnWidth => columnWidth === 0 ); const isColumnFreezable = - model.getColumnHeaderParentGroup(modelIndex, 0) === undefined; + model.getColumnHeaderParentGroup(modelIndex, 0) === undefined && + !(isExpandableGridModel(model) && model.hasExpandableRows); const isColumnFrozen = model.isColumnFrozen(modelIndex); actions.push({ title: 'Hide Column',