-
Notifications
You must be signed in to change notification settings - Fork 30
Open
Description
const FirstModal = ({ closeFirstModal }) => {
const [openSecondModal] = useModal(() => <div>Second modal</div>);
return (
<div
onClick={() => {
openSecondModal();
// This closes the second modal as well but it should not
closeFirstModal();
}}
>
First modal
</div>
);
};
const Page = () => {
const [openFirstModal, closeFirstModal] = useModal(() => (
<FirstModal closeFirstModal={closeFirstModal} />
));
return <div onClick={openFirstModal}>Click me</div>;
};
In this situation, you click on the div Click me
-> it displays First modal
Then when you click on the div First modal
:
Expected behaviour: It should display Second modal
and close FirstModal
What happens: It closes FirstModal
and displays Second modal
for a fraction of a second before closing it
Metadata
Metadata
Assignees
Labels
No labels