fix issue with checkbox state of select based search key

This commit is contained in:
John Mitchell
2020-01-09 15:40:57 -05:00
parent 1e344bdf8a
commit 4a9979e2db

View File

@@ -221,6 +221,11 @@ class Search extends React.Component {
showToolbarItem={searchKey === key}
>
{(options && (
<Fragment>
{/* TODO: update value to being object
{ actualValue: optionKey, toString: () => label }
currently a pf bug that makes the checked logic
not work with object-based values */}
<Select
variant={SelectVariant.checkbox}
aria-label={name}
@@ -233,15 +238,10 @@ class Search extends React.Component {
placeholderText={`Filter by ${name.toLowerCase()}`}
>
{options.map(([optionKey]) => (
<Fragment key={optionKey}>
{/* TODO: update value to being object
{ actualValue: optionKey, toString: () => label }
currently a pf bug that makes the checked logic
not work with object-based values */}
<SelectOption key={optionKey} value={optionKey} />
</Fragment>
))}
</Select>
</Fragment>
)) ||
(isBoolean && (
<Select