-
-
Notifications
You must be signed in to change notification settings - Fork 5.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
Form refresh issue after edit #9327
Comments
I tried to reproduce your issue in the provided stackblitz without success. Can you double check your instructions? |
hi, a video is better than a long speech : |
Finally reproduced it. Thanks. Tracked it to the fact that react-hook-form does not accept In the mean time, you'll have to update your dataProvider to return an empty string for fields that are |
Data is lost on page refresh as well, for example :
|
About the above-mentioned issue: The codebase is quite complex and large, what I guess is that save function in |
Thanks for temporary fix solution, i almost found this solution but I returned null value instead of empty string 😅 |
@djhi we would like to work on this Issue. |
@gitstart you don't need our permission: you can open a PR mentioning this issue. |
@fzaninotto I tried to work on it but the project is very complex and with high level abstractions. My brain was burnt 😃 |
@gitstart there are already 3 open PRs for your account (https://github.com/marmelab/react-admin/pulls/gitstart), for all of which changes are requested but not made. |
@slax57 Apologies for not being able to address the requests. |
@gitstart I reviewed the 1st PR and requested some changes and fixes. Thanks. |
Hello, i've an issue when I edit a record :
If I delete an existing field value, save form and just after, modify another field and save form again,
my previous field to which I deleted the value, returns to its previous value.
When form is refreshed after save, If I check the React Query dev tool, the data are however good
It's occurs only when field value was previously set to null
Little precision : I use Airtable as database, and records fields that are null are not retrieved from the record data
Steps to reproduce:
Select a record from post list
if "Name" input was empty, add value, save form, and refresh stackblitz render window
delete "Name" value
save form
change value of checkbox
save form
https://stackblitz.com/edit/github-iq4gf4?file=src%2Fposts%2FPostEdit.tsx,src%2FdataProvider.tsx,src%2Fposts%2FPostList.tsx
Environment
The text was updated successfully, but these errors were encountered: