Skip to content

Commit

Permalink
Use IrisGridUtils to display partition selector value
Browse files Browse the repository at this point in the history
  • Loading branch information
georgecwan committed Sep 25, 2023
1 parent 8b35647 commit a10df88
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 1 addition & 4 deletions packages/iris-grid/src/IrisGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1939,10 +1939,7 @@ export class IrisGrid extends Component<IrisGridProps, IrisGridState> {
partitionColumn.name
)
);
} else if (
partitionColumn.type === 'java.lang.Boolean' ||
partitionColumn.type === 'boolean'
) {
} else if (partitionColumn.type === 'java.lang.Boolean') {
partitionFilterValue = model.dh.FilterValue.ofBoolean(partition);
} else {
partitionFilterValue = model.dh.FilterValue.ofNumber(partition);
Expand Down
4 changes: 3 additions & 1 deletion packages/iris-grid/src/IrisGridPartitionSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import debounce from 'lodash.debounce';
import type { Column, dh as DhType, Table } from '@deephaven/jsapi-types';
import PartitionSelectorSearch from './PartitionSelectorSearch';
import './IrisGridPartitionSelector.scss';
import IrisGridUtils from './IrisGridUtils';

const log = Log.module('IrisGridPartitionSelector');

Expand Down Expand Up @@ -184,9 +185,10 @@ class IrisGridPartitionSelector<T> extends Component<
<input
type="text"
value={
// IrisGridUtils.convertValueToText(partition, column.type)
column.type === 'char' && partition.toString().length > 0
? String.fromCharCode(parseInt(partition, 10))
: partition
: IrisGridUtils.convertValueToText(partition, column.type)
}
onChange={this.handlePartitionChange}
className="form-control input-partition"
Expand Down

0 comments on commit a10df88

Please sign in to comment.