We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Modal
1 parent 157b858 commit 5776dcbCopy full SHA for 5776dcb
src/components/Modal/Modal.jsx
@@ -62,6 +62,9 @@ export const Modal = ({
62
internalDialogRef.current.showModal();
63
}, []);
64
65
+ // We need to have a reference to the dialog element to be able to call its methods,
66
+ // but at the same time we want to expose this reference to the parent component for
67
+ // case someone wants to call dialog methods from outside the component.
68
useImperativeHandle(dialogRef, () => internalDialogRef.current);
69
70
useModalFocus(autoFocus, internalDialogRef, primaryButtonRef);
0 commit comments