(null)
useEffect(() => {
- focusStartingPosition()
+ dialogRef.current?.showModal()
}, [])
return (
- {
+ // Prevent the browser from closing the dialog so our React state
+ // remains in control. The useModal hook handles closing via Escape.
+ e.preventDefault()
+ onCancel?.(e)
+ }}
>
-
-
-
-
{children}
-
-
-
-
-
+