Fix command menu closing and opening (#10497)
Since I introduced AnimatePresence to animate the exit of the command menu, the command menu wasn't working properly. By adding this animation, I had to reset the command menu states at the end of the animation, otherwise, the component inside the command menu would throw errors. The problem was that, by closing and instantly reopening the command menu, the `onExitComplete` wasn't triggered and the states weren't reset before the opening. By introducing a new state `isCommandMenuClosingState`, I can reset those states at the beginning of the opening if the animation didn't have the time to finish.
This commit is contained in:
@ -0,0 +1,6 @@
|
||||
import { createState } from 'twenty-ui';
|
||||
|
||||
export const isCommandMenuClosingState = createState({
|
||||
key: 'command-menu/isCommandMenuClosingState',
|
||||
defaultValue: false,
|
||||
});
|
||||
Reference in New Issue
Block a user