From 549349bcc256e1596e1f64a62a31a92e70a87b79 Mon Sep 17 00:00:00 2001 From: Joe Reuter Date: Wed, 21 Sep 2022 19:17:23 +0200 Subject: [PATCH] close popover on click --- x-pack/plugins/lens/public/app_plugin/settings_menu.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/x-pack/plugins/lens/public/app_plugin/settings_menu.tsx b/x-pack/plugins/lens/public/app_plugin/settings_menu.tsx index e4cd670286ef6..f4447929d8063 100644 --- a/x-pack/plugins/lens/public/app_plugin/settings_menu.tsx +++ b/x-pack/plugins/lens/public/app_plugin/settings_menu.tsx @@ -45,13 +45,14 @@ export function SettingsMenu({ const dispatch = useLensDispatch(); const toggleAutoApply = useCallback(() => { + onClose(); writeToStorage( new Storage(localStorage), AUTO_APPLY_DISABLED_STORAGE_KEY, String(autoApplyEnabled) ); dispatch(autoApplyEnabled ? disableAutoApply() : enableAutoApply()); - }, [dispatch, autoApplyEnabled]); + }, [dispatch, autoApplyEnabled, onClose]); return (