R
Refine

ask-any-question

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

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

Looking for more? Join the community!

R
Refine

ask-any-question

Join Server
Recommended Posts
select field data is not getting clearedhow to clear select field of the previous onescustom success notification for useUpdate hooki want my custom sucess notification for use update hook useUpdate({ successNotifiacation:{ messagusing array of fields in setFilters to searchI want to pass multiple fields in the setFilters, to search the combined first and last name of any I can't serve the app from a sub-directoryI want the base path of my app be `/admin/`. So for example the users list page would be `/admin/useselect getting undefined while changingvalues not getting selectedHow to transform query results before passing them to `useForm`?My api returns a JSON string in one of its endpoints. Something like this ```js { list: "[{id: 1},multi select tag names are not displayed in edit form<Form.Item name={["staff_speciality_mappings"]}> <CustomSelect mantine - list - header ButtonSo I was looking at the source-code for the list-component of the refine-mantine package, looking fodatepicker mantineHow would I use the 'getInputProps' method of the 'useForm' hook to register a datePicker of @mantinAmplify Auth as AuthProviderDid anyone try using amplify auth on refine? I'm experimenting on amplify and refine nextjs, dynamodUpload documents not showing in edit formi am able to upload form white creating it. while editing that form am not able to see the uploaded Create refine-app errorHello, I'm following the quick start guide and I can't seem to get past the `npm create refine-app mstaff_documents field not found errorformProps.onFinish({ // ...values, blood_group: "s", Custom Sider render property Type ErrorFollowing the tutorial: https://refine.dev/docs/api-reference/mui/customization/mui-custom-sider/#custaff_documents {document_no aaa, document_type aaa, document_url aaa}in form i want pass staff_documents field as array of objectHaving problem with antd DatePickerHi, I'm using antd datePicker in the form. It works fine in create page. But when using it in edit psaveButton props of createi want to customise save and cancel button of savebuttonprops so how to add savebuttonprops fuctionaMake useSearchParams() hook available in pankodrefine-react-router-v6Is it possible to make React Router's useSearchParams hook available through refine-react-router-v6?Can we use different resources for detail and update?I have a requirement where my resources details comes from `/endpoint` and I should update or patch nested query in meta datametaData: { fields: [ "id", "org_unit_id", "created_at", { s