mirror of
https://github.com/apache/superset.git
synced 2026-04-24 18:44:53 +00:00
fix: Filtering db names while creating dataset is not working (#17023)
This commit is contained in:
committed by
GitHub
parent
9ef2861fbd
commit
be211437de
@@ -181,6 +181,7 @@ const Select = ({
|
||||
mode = 'single',
|
||||
name,
|
||||
notFoundContent,
|
||||
onError,
|
||||
onChange,
|
||||
onClear,
|
||||
optionFilterProps = ['label', 'value'],
|
||||
@@ -328,15 +329,18 @@ const Select = ({
|
||||
setSearchedValue('');
|
||||
};
|
||||
|
||||
const onError = (response: Response) =>
|
||||
getClientErrorObject(response).then(e => {
|
||||
const { error } = e;
|
||||
setError(error);
|
||||
const internalOnError = useCallback(
|
||||
(response: Response) =>
|
||||
getClientErrorObject(response).then(e => {
|
||||
const { error } = e;
|
||||
setError(error);
|
||||
|
||||
if (props.onError) {
|
||||
props.onError(error);
|
||||
}
|
||||
});
|
||||
if (onError) {
|
||||
onError(error);
|
||||
}
|
||||
}),
|
||||
[onError],
|
||||
);
|
||||
|
||||
const handleData = (data: OptionsType) => {
|
||||
let mergedData: OptionsType = [];
|
||||
@@ -391,13 +395,13 @@ const Select = ({
|
||||
setAllValuesLoaded(true);
|
||||
}
|
||||
})
|
||||
.catch(onError)
|
||||
.catch(internalOnError)
|
||||
.finally(() => {
|
||||
setIsLoading(false);
|
||||
setIsTyping(false);
|
||||
});
|
||||
},
|
||||
[allValuesLoaded, fetchOnlyOnSearch, options],
|
||||
[allValuesLoaded, fetchOnlyOnSearch, internalOnError, options],
|
||||
);
|
||||
|
||||
const handleOnSearch = useMemo(
|
||||
|
||||
Reference in New Issue
Block a user