Skip to content

Commit

Permalink
Allow the search filters to be cleared
Browse files Browse the repository at this point in the history
Fixes #1216
  • Loading branch information
shubhit7 authored and KKoukiou committed Jun 6, 2023
1 parent 2ed1cb9 commit ba80941
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/ContainerHeader.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import cockpit from 'cockpit';
import { FormSelect, FormSelectOption } from "@patternfly/react-core/dist/esm/components/FormSelect";
import { TextInput } from "@patternfly/react-core/dist/esm/components/TextInput";
import { SearchInput } from "@patternfly/react-core/dist/esm/components/SearchInput";
import { Toolbar, ToolbarContent, ToolbarItem } from "@patternfly/react-core/dist/esm/components/Toolbar";
const _ = cockpit.gettext;

Expand All @@ -24,10 +24,11 @@ const ContainerHeader = ({ user, twoOwners, ownerFilter, handleOwnerChanged, tex
</>
}
<ToolbarItem>
<TextInput id="containers-filter"
<SearchInput id="containers-filter"
placeholder={_("Type to filter…")}
value={textFilter}
onChange={handleFilterChanged} />
onChange={(_event, value) => handleFilterChanged(value)}
onClear={() => handleFilterChanged('')} />
</ToolbarItem>
</ToolbarContent>
</Toolbar>
Expand Down

0 comments on commit ba80941

Please sign in to comment.