refine
refine copied to clipboard
fix: stale values on form close while create and edit
PR Checklist
Please check if your PR fulfills the following requirements:
- [x] The commit message follows our guidelines: https://refine.dev/docs/guides-concepts/contributing/#commit-convention
Bugs / Features
- [x] Related issue(s) linked
- [ ] Tests for the changes have been added
- [ ] Docs have been added / updated
- [ ] Changesets have been added https://refine.dev/docs/guides-concepts/contributing/#creating-a-changeset
What is the current behavior?
- when "create" form
- when user clicks on create form -> enters some value -> closes it
- when he opens it again -> previous values are still in form
- When edit
- user clicks on editing item1 -> form opens and gets value from api -> user closes form
- now user clicks on editing item2 -> from opens initially with stale values from past (i.e. item1 values)-> once api finishes item2 values are populated. this causes confusion for users with slow internet
What is the new behavior?
-
when "create" form
- when user clicks on create form -> enters some value -> closes it
- when he opens it again -> form is reset (no stale values from past)
-
When edit
- user clicks on editing item1 -> form opens but fields are hidden until api req is complete (shows loading spinner)-> populates values once api completes. no stale value is displayed from past
fixes (issue) #5954
Notes for reviewers
⚠️ No Changeset found
Latest commit: bbc2bc9f1c1045895873f717b930a1ec04569e12
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
Deploy Preview for refine-doc-live-previews ready!
Built without sensitive environment variables
| Name | Link |
|---|---|
| Latest commit | 63fa31343e61a815fb133147bb84f4d887501878 |
| Latest deploy log | https://app.netlify.com/projects/refine-doc-live-previews/deploys/684d49d6f5e0190008cfe411 |
| Deploy Preview | https://deploy-preview-6839--refine-doc-live-previews.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify project configuration.