sunny-green
sunny-green3y ago

when modal close button is pressed form data is not getting cleared

when modal close button is pressed form data is not getting cleared in antd form
8 Replies
sunny-green
sunny-greenOP3y ago
form fields are not getting cleared
genetic-orange
genetic-orange3y ago
Hey @rehan1 you can try Modal component in destroyOnClose prop.
sunny-green
sunny-greenOP3y ago
<Modal title="Add Designations" width={500} destroyOnClose={true}> but its not clearing data
genetic-orange
genetic-orange3y ago
I'm posting a sample project. You can do it here.
genetic-orange
genetic-orange3y ago
Refine Use Modal Example (forked) - StackBlitz
Run official live example code for Refine Use Modal, created by Refinedev on StackBlitz
genetic-orange
genetic-orange3y ago
Are you using Antd as UI? @rehan1
sunny-green
sunny-greenOP3y ago
i tried using onCancel prop in that i have to resetFields .... this is working

Did you find this page helpful?