You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by aa...@apache.org on 2023/01/11 17:55:34 UTC
[superset] 01/01: alert modal bug fix
This is an automated email from the ASF dual-hosted git repository.
aafghahi pushed a commit to branch arash.afghahi/sc-65239/alerts-reports-the-same-list-is-displayed
in repository https://gitbox.apache.org/repos/asf/superset.git
commit f7e21e490072843111f98cf664b3ed8e75d6dae2
Author: AAfghahi <ar...@gmail.com>
AuthorDate: Wed Jan 11 12:55:13 2023 -0500
alert modal bug fix
---
superset-frontend/src/components/Select/AsyncSelect.tsx | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/superset-frontend/src/components/Select/AsyncSelect.tsx b/superset-frontend/src/components/Select/AsyncSelect.tsx
index 5cbd193c56..6a6fc3ed83 100644
--- a/superset-frontend/src/components/Select/AsyncSelect.tsx
+++ b/superset-frontend/src/components/Select/AsyncSelect.tsx
@@ -199,11 +199,12 @@ const AsyncSelect = forwardRef(
options && Array.isArray(options) ? options.slice() : EMPTY_OPTIONS,
[options],
);
+ console.log('options', name, Array.isArray(options));
const initialOptionsSorted = useMemo(
() => initialOptions.slice().sort(sortComparatorForNoSearch),
[initialOptions, sortComparatorForNoSearch],
);
-
+ console.log('initial Options', name, initialOptions);
const [selectOptions, setSelectOptions] =
useState<SelectOptionsType>(initialOptionsSorted);
@@ -218,7 +219,7 @@ const AsyncSelect = forwardRef(
? missingValues.concat(selectOptions)
: selectOptions;
}, [selectOptions, selectValue]);
-
+ console.log('select Options', name, selectOptions);
const handleOnSelect = (
selectedItem: string | number | AntdLabeledValue | undefined,
) => {
@@ -442,7 +443,7 @@ const AsyncSelect = forwardRef(
fetchedQueries.current.clear();
setAllValuesLoaded(false);
setSelectOptions(initialOptions);
- }, [initialOptions]);
+ }, [initialOptions, options]);
useEffect(() => {
setSelectValue(value);