diff --git a/superset-frontend/src/explore/components/useExploreAdditionalActionsMenu/index.jsx b/superset-frontend/src/explore/components/useExploreAdditionalActionsMenu/index.jsx index 45d8d3efab..2ccbbeb25e 100644 --- a/superset-frontend/src/explore/components/useExploreAdditionalActionsMenu/index.jsx +++ b/superset-frontend/src/explore/components/useExploreAdditionalActionsMenu/index.jsx @@ -114,12 +114,12 @@ export const useExploreAdditionalActionsMenu = ( onOpenPropertiesModal, ownState, dashboards, + ...rest ) => { const theme = useTheme(); const { addDangerToast, addSuccessToast } = useToasts(); const [showReportSubMenu, setShowReportSubMenu] = useState(null); const [isDropdownVisible, setIsDropdownVisible] = useState(false); - const [openSubmenus, setOpenSubmenus] = useState([]); const chart = useSelector( state => state.charts?.[getChartKey(state.explore)], ); @@ -204,23 +204,19 @@ export const useExploreAdditionalActionsMenu = ( case MENU_KEYS.EXPORT_TO_CSV: exportCSV(); setIsDropdownVisible(false); - setOpenSubmenus([]); break; case MENU_KEYS.EXPORT_TO_CSV_PIVOTED: exportCSVPivoted(); setIsDropdownVisible(false); - setOpenSubmenus([]); break; case MENU_KEYS.EXPORT_TO_JSON: exportJson(); setIsDropdownVisible(false); - setOpenSubmenus([]); break; case MENU_KEYS.EXPORT_TO_XLSX: exportExcel(); setIsDropdownVisible(false); - setOpenSubmenus([]); break; case MENU_KEYS.DOWNLOAD_AS_IMAGE: downloadAsImage( @@ -230,21 +226,17 @@ export const useExploreAdditionalActionsMenu = ( true, )(domEvent); setIsDropdownVisible(false); - setOpenSubmenus([]); break; case MENU_KEYS.COPY_PERMALINK: copyLink(); setIsDropdownVisible(false); - setOpenSubmenus([]); break; case MENU_KEYS.EMBED_CODE: setIsDropdownVisible(false); - setOpenSubmenus([]); break; case MENU_KEYS.SHARE_BY_EMAIL: shareByEmail(); setIsDropdownVisible(false); - setOpenSubmenus([]); break; case MENU_KEYS.VIEW_QUERY: setIsDropdownVisible(false); @@ -272,12 +264,7 @@ export const useExploreAdditionalActionsMenu = ( const menu = useMemo( () => ( -