Force close dropdown when using cmdK (#12506)

### Issue: 
overflow of input fields when opening the side panel.

Could be imporved with a better command menu state handling

### Solution:
In command menu hooks, we now close all dropdowns when opening the side
panel. This ensures all UI elements are close properly before the
sidepanel shows up

Fixes : https://github.com/twentyhq/twenty/issues/12485

Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
Guillim
2025-06-16 16:07:13 +02:00
committed by GitHub
parent 6a224241ec
commit 0349003775

View File

@ -37,13 +37,14 @@ export const useCommandMenu = () => {
);
const openCommandMenu = useCallback(() => {
closeAnyOpenDropdown();
navigateCommandMenu({
page: CommandMenuPages.Root,
pageTitle: 'Command Menu',
pageIcon: IconDotsVertical,
resetNavigationStack: true,
});
}, [navigateCommandMenu]);
}, [closeAnyOpenDropdown, navigateCommandMenu]);
const toggleCommandMenu = useRecoilCallback(
({ snapshot, set }) =>