From 1d82d4f4f1eb454739280bedba4688c2f8593c2a Mon Sep 17 00:00:00 2001 From: Tomas Bolger Date: Fri, 5 May 2023 12:55:33 +1000 Subject: [PATCH] Call onClear in LocationSuggest (#932) * Call onClear in LocationSuggest * Update fe/lib/components/LocationSuggest/LocationSuggest.tsx Co-authored-by: Ryan Ling * Update .changeset/quick-onions-remember.md Co-authored-by: Ryan Ling --------- Co-authored-by: Ryan Ling --- .changeset/quick-onions-remember.md | 5 +++++ fe/lib/components/LocationSuggest/LocationSuggest.tsx | 2 ++ 2 files changed, 7 insertions(+) create mode 100644 .changeset/quick-onions-remember.md diff --git a/.changeset/quick-onions-remember.md b/.changeset/quick-onions-remember.md new file mode 100644 index 000000000..a32f3a8fb --- /dev/null +++ b/.changeset/quick-onions-remember.md @@ -0,0 +1,5 @@ +--- +'wingman-fe': patch +--- + +LocationSuggest: Call `onClear` diff --git a/fe/lib/components/LocationSuggest/LocationSuggest.tsx b/fe/lib/components/LocationSuggest/LocationSuggest.tsx index f8916ba5c..76e113c81 100644 --- a/fe/lib/components/LocationSuggest/LocationSuggest.tsx +++ b/fe/lib/components/LocationSuggest/LocationSuggest.tsx @@ -51,6 +51,7 @@ export const LocationSuggest = forwardRef< first = 5, hirerId, onSelect, + onClear, schemeId, usageTypeCode = 'PositionPosting', initialValue, @@ -174,6 +175,7 @@ export const LocationSuggest = forwardRef< onClear={() => { setSelectedLocation(undefined); setPlaceholder(''); + onClear?.(); }} onDetectLocation={handleDetectLocationClicked} onSelect={handleLocationSelect}