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