Skip to content

Commit

Permalink
clear query and reset options
Browse files Browse the repository at this point in the history
  • Loading branch information
kyledurand committed Mar 25, 2024
1 parent 9d79ef1 commit 927c0a0
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions polaris-react/src/components/Picker/Picker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,22 +80,20 @@ export function Picker({
}, []);

const handleFocus = useCallback(() => {
if (shouldOpen) {
handleOpen();
}
if (shouldOpen) handleOpen();
}, [shouldOpen, handleOpen]);

const handleChange = useCallback(() => {
if (shouldOpen) {
handleOpen();
}
if (shouldOpen) handleOpen();
}, [shouldOpen, handleOpen]);

const handleBlur = useCallback(() => {
if (popoverActive) {
handleClose();
setQuery('');
setFilteredOptions(options);
}
}, [popoverActive, handleClose]);
}, [popoverActive, handleClose, options]);

const textFieldContextValue: ComboboxTextFieldType = useMemo(
() => ({
Expand Down

0 comments on commit 927c0a0

Please sign in to comment.