Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(Modal): unmount when hidden #2165

Merged
merged 4 commits into from
Jun 9, 2024
Merged

Conversation

talkor
Copy link
Member

@talkor talkor commented Jun 5, 2024

@talkor talkor requested a review from a team as a code owner June 5, 2024 15:12
@talkor talkor changed the title Feat/modal/unmount when hidden feat(Modal): unmount when hidden Jun 6, 2024
/**
* If true, the modal will unmount when it's not shown
*/
unmountOnClose?: boolean;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Opened a ticket to remove it next major

useEffect(() => {
if (!instance) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why did you removed this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The check is unnecessary here, it's already checked inside the conditions. If it exists here, when the modal is not being rendered, it will not render at all

packages/core/src/components/Modal/useShowHideModal.ts Outdated Show resolved Hide resolved
@talkor talkor merged commit d5ba05c into master Jun 9, 2024
10 checks passed
@talkor talkor deleted the feat/modal/unmount-when-hidden branch June 9, 2024 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants