Skip to content

Commit

Permalink
fix: Dynamic filter does not show all values on blur/clear events (ap…
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-s-molina authored and jzhao62 committed May 16, 2024
1 parent ccb1bd8 commit da7c92f
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 da7c92f

Please sign in to comment.