Skip to content

fix: stale initialValue when components remonts#332

Open
Ducica wants to merge 1 commit intomasterfrom
oarepo-contribution-richinput-stale-initial-value
Open

fix: stale initialValue when components remonts#332
Ducica wants to merge 1 commit intomasterfrom
oarepo-contribution-richinput-stale-initial-value

Conversation

@Ducica
Copy link
Copy Markdown
Contributor

@Ducica Ducica commented Apr 16, 2026

  • when the fields is in arrayField, you fill something in it, save form
  • then delete that entry from array field and add again, it still
  • contains old value even though in formik that field is empty

❤️ Thank you for your contribution!

Screen.Recording.2026-04-16.at.9.42.25.mov

Description

There is issue with stale initialValue when the component remounts. Meaning, after this happens, in formik, you have "" at that slot, but in the UI you see previously existing text. This then creates weird situations for the user, as he things he is sending one thing to the server, but it is actually nothing there.

* when the fields is in arrayField, you fill something in it, save form
* then delete that entry from array field and add again, it still
* contains old value even though in formik that field is empty
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant