Skip to content

Commit

Permalink
fix(modal): fix input is not allowed to input text in Modal (#1579)
Browse files Browse the repository at this point in the history
fix #1570
  • Loading branch information
simonguo committed Mar 19, 2021
1 parent 9b5c047 commit f4ec497
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Overlay/Modal.tsx
Expand Up @@ -246,7 +246,7 @@ const Modal: RsRefForwardingComponent<'div', ModalProps> = React.forwardRef(
return;
}
handleOpen();
}, [open, exited, handleOpen, handleClose]);
}, [open, handleOpen]);

useEffect(() => {
if (!exited) {
Expand All @@ -255,11 +255,12 @@ const Modal: RsRefForwardingComponent<'div', ModalProps> = React.forwardRef(
handleClose();
}, [exited, handleClose]);

// will unmount
useEffect(() => {
return () => {
handleClose();
};
}, [handleClose]);
}, []);

const handleExited = useCallback(() => {
setExited(true);
Expand Down

0 comments on commit f4ec497

Please sign in to comment.