Skip to content

Commit 88fed2c

Browse files
committed
Fix boolean filtering select type
1 parent e7fd854 commit 88fed2c

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/use-filtering.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ import { DataSourceType } from "./datagrid";
66
import { Popover2 } from "@blueprintjs/popover2";
77
import { Select2 } from "@blueprintjs/select";
88

9-
const BooleanSelect = Select2<OptionalBoolean>;
10-
119
interface ColumnFilteringState {
1210
type: ColumnType;
1311
}
@@ -301,7 +299,7 @@ export const useFiltering = <T extends DataSourceType>(columns: ColumnProps<T>[]
301299
const currentState = filteringState[column.field] as BooleanColumnFilteringState;
302300
return (
303301
<th key={column.field} className="filter-cell">
304-
<BooleanSelect
302+
<Select2<OptionalBoolean>
305303
items={[OptionalBoolean.NONE, OptionalBoolean.TRUE, OptionalBoolean.FALSE]}
306304
itemRenderer={(item: OptionalBoolean, { handleClick }) => (
307305
<MenuItem text={getValueBasedOnOptionalBoolean(item, "None", "True", "False")} onClick={handleClick} />
@@ -321,7 +319,7 @@ export const useFiltering = <T extends DataSourceType>(columns: ColumnProps<T>[]
321319
text={getValueBasedOnOptionalBoolean(currentState.value, "Select...", "True", "False")}
322320
rightIcon={IconNames.DoubleCaretVertical}
323321
/>
324-
</BooleanSelect>
322+
</Select2>
325323
</th>
326324
);
327325
};

0 commit comments

Comments
 (0)