Skip to content

Commit 14f0dd7

Browse files
committed
Made popover close whenever state changes
1 parent 83f48af commit 14f0dd7

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

packages/react/src/components/FormattingToolbar/DefaultButtons/CreateLinkButton.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,8 @@ export const CreateLinkButton = () => {
8585
},
8686
});
8787
useEffect(() => {
88-
if (state?.url === undefined) {
89-
setShowPopover(false);
90-
}
91-
}, [state?.url]);
88+
setShowPopover(false);
89+
}, [state]);
9290

9391
// Makes Ctrl+K/Meta+K open link creation popover.
9492
useEffect(() => {

0 commit comments

Comments
 (0)