-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
A edit dialog implemented with useModalForm() will work well if every time I tried to open to edit a different resource id, but will always fail to populate the data if I open the same resource as the last-open one.
Steps To Reproduce
I am using the MUI useModalForm() in a resource list page to to edit selected resource by users. I created a Edit dialog component, and embedded a single instance at the end of the page.
- When I open the modal (action='edit') the first time on a resource id, it was able to read the resource and populate the form with correct data.
- When I opened the modal on the same resource id again (back to back), it failed to populate the form data. All the fields are empty.
- If I tried to open a "different" resource id than the last-open id, it started working again.
- Note: the isDirty state is also not reset between different edit sessions, and it is not consistent with the dirtyFields value.
Expected behavior
I expect that open to edit the same resource back-to-back will still work.
Packages
"@refinedev/core": "^4.57.9",
"@refinedev/mui": "^6.2.1",
"@refinedev/nextjs-router": "^6.2.3",
"@refinedev/react-hook-form": "^4.10.2",
Additional Context
No response
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working