prevent create property popover flash

This commit is contained in:
Philipinho
2026-04-28 10:46:27 +01:00
parent 86809fc0dc
commit 4a25e787fa
@@ -104,9 +104,13 @@ export function CreatePropertyPopover({ pageId, properties, onPropertyCreated }:
}, [resetState]);
const handleClose = useCallback(() => {
// Don't reset panel/selectedType/etc. here — the popover's close
// transition is still rendering the dropdown for a frame, and
// resetting `panel` to "typePicker" mid-close flashes the type
// picker after the user clicks "Create field". `handleOpen`
// resets state on the next open instead.
setOpened(false);
resetState();
}, [resetState]);
}, []);
const attemptClose = useCallback(() => {
if (panel === "configure" && hasContent) {