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

Fix: cleared 'Create a New Variant' modal input data #1791

Merged
merged 2 commits into from
Jun 20, 2024

Conversation

ashrafchowdury
Copy link
Collaborator

Description

Cleared the input data from the 'Create a New Variant' modal after successfully creating a variant to enhance user experience.

Issue
Closes #1790

Copy link

vercel bot commented Jun 15, 2024

@ashrafchowdury is attempting to deploy a commit to the mmabrouk's projects Team on Vercel.

A member of the Team first needs to authorize it.

@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. typescript UX labels Jun 15, 2024
Copy link
Member

@bekossy bekossy left a comment

Choose a reason for hiding this comment

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

Thank you for the PR @ashrafchowdury! Instead of manually clearing the state, please use the destroyOnClose prop provided by Antd's Modal component. This will automatically destroy the modal's child components when it is closed, ensuring the state is reset when reopened.

@ashrafchowdury
Copy link
Collaborator Author

Thank you for the PR @ashrafchowdury! Instead of manually clearing the state, please use the destroyOnClose prop provided by Antd's Modal component. This will automatically destroy the modal's child components when it is closed, ensuring the state is reset when reopened.

Thanks for the suggestion @bekossy

@ashrafchowdury ashrafchowdury requested a review from bekossy June 18, 2024 07:43
Copy link
Member

@bekossy bekossy left a comment

Choose a reason for hiding this comment

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

Thank you for the PR @ashrafchowdury

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jun 18, 2024
@mmabrouk mmabrouk merged commit 70334a7 into Agenta-AI:main Jun 20, 2024
2 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm This PR has been approved by a maintainer size:XS This PR changes 0-9 lines, ignoring generated files. typescript UX
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: 'Create a New Variant' modal input data do not get cleared
3 participants