Skip to content

Commit

Permalink
Reset frozenColumns
Browse files Browse the repository at this point in the history
  • Loading branch information
emilyhuxng committed Apr 3, 2023
1 parent c1cdfa6 commit f5ee43f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
1 change: 1 addition & 0 deletions packages/iris-grid/src/IrisGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3198,6 +3198,7 @@ export class IrisGrid extends Component<IrisGridProps, IrisGridState> {
this.setState({
rollupConfig,
movedColumns: [],
frozenColumns: [],
sorts: [],
reverseType: TableUtils.REVERSE_TYPE.NONE,
selectDistinctColumns: [],
Expand Down
9 changes: 8 additions & 1 deletion packages/iris-grid/src/IrisGridModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -275,10 +275,17 @@ abstract class IrisGridModel<
/**
* @returns Names of columns which should be frozen to the front and floating
*/
get frozenColumns(): readonly ColumnName[] {
get frozenColumns(): ColumnName[] {
return EMPTY_ARRAY;
}

// /**
// * @param columns Names of columns which should be frozen to the front and floating
// */
// set frozenColumns(columns: ColumnName[]) {
// this.frozenColumns = columns;
// }

/**
* @param index The column index to check
* @returns Whether the column is one of LayoutHints' frozen columns
Expand Down
6 changes: 5 additions & 1 deletion packages/iris-grid/src/IrisGridTreeTableModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -182,6 +182,10 @@ class IrisGridTreeTableModel extends IrisGridTableModelTemplate<
)
)
);

updateFrozenColumns(columns: ColumnName[]): void {
this.frozenColumns = columns;
}
}

export default IrisGridTreeTableModel;

0 comments on commit f5ee43f

Please sign in to comment.