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:
@ -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 }) =>
|
||||
|
||||
Reference in New Issue
Block a user