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:33 UTC

[superset] branch arash.afghahi/sc-65239/alerts-reports-the-same-list-is-displayed created (now f7e21e4900)

This is an automated email from the ASF dual-hosted git repository.

aafghahi pushed a change to branch arash.afghahi/sc-65239/alerts-reports-the-same-list-is-displayed
in repository https://gitbox.apache.org/repos/asf/superset.git


      at f7e21e4900 alert modal bug fix

This branch includes the following new commits:

     new f7e21e4900 alert modal bug fix

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[superset] 01/01: alert modal bug fix

Posted by aa...@apache.org.
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);