diff --git a/packages/iris-grid/src/IrisGridPartitionSelector.test.tsx b/packages/iris-grid/src/IrisGridPartitionSelector.test.tsx index 0d26ca357..93c902899 100644 --- a/packages/iris-grid/src/IrisGridPartitionSelector.test.tsx +++ b/packages/iris-grid/src/IrisGridPartitionSelector.test.tsx @@ -46,8 +46,10 @@ it('should display multiple selectors to match columns', () => { irisGridTestUtils.makeColumn('a'), irisGridTestUtils.makeColumn('b'), ]; - const component = makeIrisGridPartitionSelector(makeModel(columns)); + const { container } = makeIrisGridPartitionSelector(makeModel(columns)); - const selectors = component.getAllByRole('combobox'); + const selectors = Array.from( + container.getElementsByClassName('column-selector') + ); expect(selectors).toHaveLength(2); }); diff --git a/packages/iris-grid/src/IrisGridPartitionSelector.tsx b/packages/iris-grid/src/IrisGridPartitionSelector.tsx index cd7df309f..963c08afc 100644 --- a/packages/iris-grid/src/IrisGridPartitionSelector.tsx +++ b/packages/iris-grid/src/IrisGridPartitionSelector.tsx @@ -1,10 +1,10 @@ import React, { Component } from 'react'; import memoizee from 'memoizee'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { Button } from '@deephaven/components'; +import { Button, ItemKey } from '@deephaven/components'; import { vsChevronRight, vsMerge, vsKey } from '@deephaven/icons'; import Log from '@deephaven/log'; -import { TableDropdown } from '@deephaven/jsapi-components'; +import { Picker } from '@deephaven/jsapi-components'; import type { dh } from '@deephaven/jsapi-types'; import { TableUtils } from '@deephaven/jsapi-utils'; import { assertNotNull, Pending, PromiseUtils } from '@deephaven/utils'; @@ -294,23 +294,32 @@ class IrisGridPartitionSelector extends Component< const { model, partitionConfig } = this.props; const { isLoading, partitionFilters, partitionTables } = this.state; - const { mode, partitions } = partitionConfig; + const { partitions } = partitionConfig; + if (partitionFilters !== null && partitionTables !== null) { + partitionFilters.forEach((filter, index) => { + partitionTables[index].applyFilter(filter as dh.FilterCondition[]); + }); + } const partitionSelectors = model.partitionColumns.map((column, index) => (
-
{column.name}
- 0 && partitionConfig.mode !== 'partition') || isLoading - } - formatValue={this.getCachedFormatValueCallback(index)} - /> + {partitionTables?.[index] && ( + 0 && partitionConfig.mode !== 'partition') || isLoading + } + /> + )} {model.partitionColumns.length - 1 === index || ( )} @@ -321,7 +330,6 @@ class IrisGridPartitionSelector extends Component<
Partitioned Table