-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEAT] Have an optional to reset from when close modal inside useModalForm
#5954
Comments
@Dominic-Preap and @alicanerdurmaz, I am interested in this issue. Can you please assign it to me? Also, can you please guide me on the solution |
@Dominic-Preap I'd like to work on this one. Please assign it to me, I'd be happy to contribute. |
Hey @GANES1998 assigned issue to you, if we don't hear back from you, we'll assign it to @Xajid |
Hi @BatuhanW, Thanks for assigning to me. I'll work on this. |
Hey @Dominic-Preap , I am interested to work on this issue. Can you please assign it to me if it is still unsolved ? |
@bhargavpshah98 are you still interested working on this issue? |
Hello @BatuhanW , Yes I am interested |
Hey @Dominic-Preap and @alicanerdurmaz , if this is still available can u assign it to me ? |
Hey @bhargavpshah98, it seems the notification lost and didn't see your comment. Just assigned to you, looking forward to your PR! @abdulqdaer-q since @bhargavpshah98 asked earlier, I assigned to him. We can assign to you if he won't work on this one. |
hey @BatuhanW, is this issue still open? if so please assign it to me, I'd like to contribute. |
Hi @BatuhanW, I can work on this issue, can you assign this to me if it's still unresolved? Edit: Additionally, I tried the |
Hey everyone! I had some time to break down the issues here. For the I hope understood correctly @Dominic-Preap, when calling
By default, @paoloLigsay Can you also check if setting I think the change can be done here in
If this resolves the issue, we're open to contributions for the fix 🙏 |
|
@BatuhanW |
Hey @aqir-sapaad assigned to you. |
sorry it was my work email can you please assign to me here @BatuhanW |
Ran into this issue myself. I did a little playing around and if I use a I traced that id around in code for a bit and it appears that this happens because the
I think this useEffect is triggered when
When the |
Doing this does appear to have the problem of |
Hey, @Dominic-Preap I'd want to contribute to this issue 🚀 |
Hey @ChevrierDev I've assigned this issue to you. |
just faced with this issues. Tried to edit and save, and then open the same item, the form is empty. But if i open other items, the value is there again. It seems like when i open the same item (this is probably reading from id), the value didn't get inserted into the form. |
Hello @BatuhanW, could you assign this issue to me? I'd love to fix it once and for all. |
I somehow solved this problem by setting cacheTime:0 and structuralFileSharing:false in the queryOptions |
Hi there. If this issue is still unsolved. I would like to work on this feature to add an optional state reset when closing the modal inside useModalForm. Could you please assign this issue to me? Thank you! |
Assigned issue to you. @imHardik1606 if we don't hear back from @abkr08, we'll assign it to you. |
Thanks, @BatuhanW. I will get it sorted. |
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: