Skip to content

Commit

Permalink
fix: Dynamic filter does not show all values on blur/clear events (#2…
Browse files Browse the repository at this point in the history
…8036)

(cherry picked from commit 6e01a68)
  • Loading branch information
michael-s-molina committed Apr 16, 2024
1 parent aa75891 commit ee92eeb
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,8 @@ export default function PluginFilterSelect(props: PluginFilterSelectProps) {

const handleBlur = useCallback(() => {
unsetFocusedFilter();
}, [unsetFocusedFilter]);
onSearch('');
}, [onSearch, unsetFocusedFilter]);

const handleChange = useCallback(
(value?: SelectValue | number | string) => {
Expand Down Expand Up @@ -293,7 +294,7 @@ export default function PluginFilterSelect(props: PluginFilterSelectProps) {
>
<Select
allowClear
allowNewOptions
allowNewOptions={!searchAllOptions}
allowSelectAll={!searchAllOptions}
// @ts-ignore
value={filterState.value || []}
Expand All @@ -307,6 +308,7 @@ export default function PluginFilterSelect(props: PluginFilterSelectProps) {
showSearch={showSearch}
mode={multiSelect ? 'multiple' : 'single'}
placeholder={placeholderText}
onClear={() => onSearch('')}
onSearch={onSearch}
onBlur={handleBlur}
onFocus={setFocusedFilter}
Expand Down

0 comments on commit ee92eeb

Please sign in to comment.