You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Hi, I would like to have option to reset the form value to defaultValues when use close() in useModalForm hooks.
There are 2 issues, I'm facing:
When using create useModalForm({refineCoreProps:{action: 'create'}) I want to reset the form when user just close() (cancel by chance) and when user open modal again, the previous value is still there.
When using edit useModalForm({refineCoreProps:{action: 'edit'}), when close modal and open another modal by call show(id), the previous data is still inside the new modal and waiting to replace after fetch is completed. This will make user experience confuse sometimes when the internet is slow.
To bypass the issue, we call reset() then close().
Describe alternatives you've considered
It would be nice to have another option inside useModalForm when user want to reset form after closing the form not just by summitted. For example
Is your feature request related to a problem? Please describe.
Hi, I would like to have option to reset the form value to
defaultValues
when useclose()
inuseModalForm
hooks.There are 2 issues, I'm facing:
useModalForm({refineCoreProps:{action: 'create'})
I want to reset the form when user justclose()
(cancel by chance) and when user open modal again, the previous value is still there.useModalForm({refineCoreProps:{action: 'edit'})
, when close modal and open another modal by callshow(id)
, the previous data is still inside the new modal and waiting to replace after fetch is completed. This will make user experience confuse sometimes when the internet is slow.To bypass the issue, we call
reset()
thenclose()
.Describe alternatives you've considered
It would be nice to have another option inside
useModalForm
when user want to reset form after closing the form not just by summitted. For exampleAdditional context
N/A
Describe the thing to improve
N/A
The text was updated successfully, but these errors were encountered: