deep-jade
deep-jade2y 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
deep-jade
deep-jadeOP2y ago
form fields are not getting cleared
correct-apricot
correct-apricot2y ago
Hey @rehan1 you can try Modal component in destroyOnClose prop.
deep-jade
deep-jadeOP2y ago
<Modal title="Add Designations" width={500} destroyOnClose={true}> but its not clearing data
correct-apricot
correct-apricot2y ago
I'm posting a sample project. You can do it here.
correct-apricot
correct-apricot2y ago
Refine Use Modal Example (forked) - StackBlitz
Run official live example code for Refine Use Modal, created by Refinedev on StackBlitz
correct-apricot
correct-apricot2y ago
Are you using Antd as UI? @rehan1
deep-jade
deep-jadeOP2y ago
i tried using onCancel prop in that i have to resetFields .... this is working