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