Skip to content

Commit

Permalink
close popover on click (#141272)
Browse files Browse the repository at this point in the history
  • Loading branch information
flash1293 authored Sep 22, 2022
1 parent 60fc42c commit fcbb4e4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion x-pack/plugins/lens/public/app_plugin/settings_menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<EuiWrappingPopover
Expand Down

0 comments on commit fcbb4e4

Please sign in to comment.