You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2021/01/12 15:31:39 UTC

[GitHub] [superset] kkucharc commented on a change in pull request #12410: fix: Popover closes on change of dropdowns values

kkucharc commented on a change in pull request #12410:
URL: https://github.com/apache/superset/pull/12410#discussion_r555858300



##########
File path: superset-frontend/src/components/Select/SupersetStyledSelect.tsx
##########
@@ -259,36 +257,43 @@ function styled<
     };
 
     const theme = useTheme();
+    const menuPortalTargetRef = React.useRef() as React.MutableRefObject<HTMLDivElement>;
 
     return (
-      <MaybeSortableSelect
-        ref={setRef}
-        className={className}
-        classNamePrefix={classNamePrefix}
-        isMulti={isMulti}
-        isClearable={isClearable}
-        options={options}
-        value={value}
-        minMenuHeight={minMenuHeight}
-        maxMenuHeight={maxMenuHeight}
-        filterOption={
-          // filterOption may be NULL
-          filterOption !== undefined
-            ? filterOption
-            : createFilter({ ignoreAccents })
-        }
-        styles={{ ...DEFAULT_STYLES, ...stylesConfig } as SelectProps['styles']}
-        // merge default theme from `react-select`, default theme for Superset,
-        // and the theme from props.
-        theme={reactSelectTheme =>
-          merge(reactSelectTheme, defaultTheme(theme), themeConfig)
-        }
-        formatOptionLabel={formatOptionLabel}
-        getOptionLabel={getOptionLabel}
-        getOptionValue={getOptionValue}
-        components={components}
-        {...restProps}
-      />
+      <div ref={menuPortalTargetRef}>

Review comment:
       I've tried to test it and I can't find places where exact benefit of referring `menuPortalTarget` to the div. Maybe you could provide some gif or screens where it helps? Otherwise maybe `menuPortalTarget={document.body}` would be enough?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org