From 444fde76a2215ec7997bf011ccb42377340df5d9 Mon Sep 17 00:00:00 2001 From: Katie McFaul Date: Fri, 23 Sep 2022 14:23:27 -0400 Subject: [PATCH] add clear callback --- .../components/DualListSelector/DualListSelectorPane.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/react-core/src/components/DualListSelector/DualListSelectorPane.tsx b/packages/react-core/src/components/DualListSelector/DualListSelectorPane.tsx index dc37cb83ffe..a633181e03f 100644 --- a/packages/react-core/src/components/DualListSelector/DualListSelectorPane.tsx +++ b/packages/react-core/src/components/DualListSelector/DualListSelectorPane.tsx @@ -57,6 +57,8 @@ export interface DualListSelectorPaneProps { onSearch?: (event: React.ChangeEvent) => void; /** @hide A callback for when the search input value for changes. To be used when isSearchable is true. */ onSearchInputChanged?: (value: string, event: React.FormEvent) => void; + /** @hide Callback for search input clear button */ + onSearchInputClear?: (event: React.SyntheticEvent) => void; /** @hide Filter function for custom filtering based on search string. To be used when isSearchable is true. */ filterOption?: (option: React.ReactNode, input: string) => boolean; /** @hide Accessible label for the search input. To be used when isSearchable is true. */ @@ -81,6 +83,7 @@ export const DualListSelectorPane: React.FunctionComponent onChange('', e as React.FormEvent) + } isDisabled={isDisabled} aria-label={searchInputAriaLabel} type="search"