mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-18 02:26:21 +08:00
fix(plugin): hide left menu when block change
This commit is contained in:
@@ -168,6 +168,12 @@ export const GroupMenu = function ({ editor, hooks }: GroupMenuProps) {
|
||||
|
||||
useEffect(() => {
|
||||
setShowMenu(false);
|
||||
|
||||
if (groupBlock) {
|
||||
const unobserve = groupBlock.onUpdate(() => setGroupBlock(null));
|
||||
return unobserve;
|
||||
}
|
||||
return undefined;
|
||||
}, [groupBlock]);
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user