mirror of
https://github.com/apache/superset.git
synced 2026-05-07 08:54:23 +00:00
fix: Dynamic filter does not show all values on blur/clear events (#28036)
(cherry picked from commit 6e01a68276)
This commit is contained in:
committed by
Michael S. Molina
parent
aa75891136
commit
ee92eeb605
@@ -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) => {
|
||||
@@ -293,7 +294,7 @@ export default function PluginFilterSelect(props: PluginFilterSelectProps) {
|
||||
>
|
||||
<Select
|
||||
allowClear
|
||||
allowNewOptions
|
||||
allowNewOptions={!searchAllOptions}
|
||||
allowSelectAll={!searchAllOptions}
|
||||
// @ts-ignore
|
||||
value={filterState.value || []}
|
||||
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user