diff --git a/packages/grid/src/GridRange.ts b/packages/grid/src/GridRange.ts index 8f30a5d1ac..48660123dc 100644 --- a/packages/grid/src/GridRange.ts +++ b/packages/grid/src/GridRange.ts @@ -1,16 +1,20 @@ export type GridRangeIndex = number | null; +export type RequiredGridRangeIndex = number; type LeftIndex = GridRangeIndex; type RightIndex = GridRangeIndex; type TopIndex = GridRangeIndex; type BottomIndex = GridRangeIndex; -export type GridCell = { column: number; row: number }; +export type GridCell = { + column: RequiredGridRangeIndex; + row: RequiredGridRangeIndex; +}; export interface BoundedGridRange extends GridRange { - startColumn: number; - startRow: number; - endColumn: number; - endRow: number; + startColumn: RequiredGridRangeIndex; + startRow: RequiredGridRangeIndex; + endColumn: RequiredGridRangeIndex; + endRow: RequiredGridRangeIndex; } // Also exported via GridRange.SELECTION_DIRECTION diff --git a/packages/iris-grid/src/ColumnStatistics.tsx b/packages/iris-grid/src/ColumnStatistics.tsx index 3d6976703c..15c7219144 100644 --- a/packages/iris-grid/src/ColumnStatistics.tsx +++ b/packages/iris-grid/src/ColumnStatistics.tsx @@ -3,15 +3,12 @@ import classNames from 'classnames'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { Button, CopyButton, LoadingSpinner } from '@deephaven/components'; import { dhFreeze, dhRefresh, dhSortSlash, vsLock } from '@deephaven/icons'; -import type { - Column, - ColumnStatistics as APIColumnStatistics, -} from '@deephaven/jsapi-types'; +import type { ColumnStatistics as APIColumnStatistics } from '@deephaven/jsapi-types'; import Log from '@deephaven/log'; import { CancelablePromise, PromiseUtils } from '@deephaven/utils'; import { isExpandableGridModel } from '@deephaven/grid'; import './ColumnStatistics.scss'; -import IrisGridModel from './IrisGridModel'; +import IrisGridModel, { DisplayColumn } from './IrisGridModel'; const log = Log.module('ColumnStatistics'); const STATS_LABEL_OVERRIDES: Record = { @@ -26,14 +23,14 @@ interface Statistic { } interface ColumnStatisticsProps { - column: Column; + column: DisplayColumn; model: IrisGridModel; onStatistics: () => void; } interface ColumnStatisticsState { error: unknown; loading: boolean; - statistics: Statistic[] | null; + statistics: readonly Statistic[] | null; numRows: number; } @@ -84,7 +81,7 @@ class ColumnStatistics extends Component< cancelablePromise: CancelablePromise | null; maybeGenerateStatistics(): void { - const { model } = this.props; + const { column, model } = this.props; const numRows = model.rowCount - @@ -92,7 +89,7 @@ class ColumnStatistics extends Component< model.floatingBottomRowCount - model.floatingTopRowCount; this.setState({ numRows }); - if (!model.isColumnStatisticsAvailable) { + if (!model.isColumnStatisticsAvailable || column.isProxy === true) { this.setState({ loading: false }); } else if (numRows < ColumnStatistics.AUTO_GENERATE_LIMIT) { this.handleGenerateStatistics(); @@ -200,7 +197,7 @@ class ColumnStatistics extends Component< return (
- {column.name} + {column.displayName ?? column.name}  ({columnType}) void; - columns: readonly Column[]; + columns: readonly DisplayColumn[]; } interface CrossColumnSearchState { @@ -233,23 +234,27 @@ class CrossColumnSearch extends PureComponent<
Searched Columns
- {columns.map(column => ( - - this.toggleColumn(column.name)} - > - {column.name} - + {columns.map(column => { + if (column.isProxy === true) return null; - {column.type.substring(column.type.lastIndexOf('.') + 1)} - - ))} + return ( + + this.toggleColumn(column.name)} + > + {column.name} + + + {column.type.substring(column.type.lastIndexOf('.') + 1)} + + ); + })}