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

Improve Modal mount handling #3137

Open
yomybaby opened this issue Feb 11, 2025 — with Lablup-Issue-Syncer · 0 comments
Open

Improve Modal mount handling #3137

yomybaby opened this issue Feb 11, 2025 — with Lablup-Issue-Syncer · 0 comments
Assignees

Comments

@yomybaby
Copy link
Member

When using Ant Design's Modal with the destroyOnClose prop, the modal only renders its children when open. However, if a custom Modal component(e.g. BAIModal) is created using this, the state of this this custom Modal component does not reset state upon closing. This is because the component remains in the React render tree even when closed. This can lead to unnecessary rendering and network requests, requiring additional logic unrelated to the component's primary function to prevent these issues. There is a need to improve this for better code readability and maintainability.

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

No branches or pull requests

1 participant