Feature Request: Option to Keep Values of Unmounted Inputs in FormState (React Native)
See original GitHub issueIs your feature request related to a problem? Please describe. When using Modals, especially the Modal component from React Native Paper, if the form elements are unmounted, then their values are removed from the formState.
Describe the solution you’d like
Please give an option to allow for these values to persist when unmounted, as React Native has a lot of areas in which Dialog components simply return null
to show that they are not displayed, rather than tweaking the styling.
Describe alternatives you’ve considered I’ve considered creating my own Modal components just to get around this issue, but honestly it would be nice to have the option regardless.
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (6 by maintainers)
Top Results From Across the Web
Form's values get lost after hide / show form in render #1990
Describe the bug If I have Form with values and I want to show custom input to specify custom value and hide From,...
Read more >useForm | React Hook Form - Simple React forms validation
This option allows you to configure validation strategy when inputs with ... to keep user interacted/dirty value and not remove any user errors...
Read more >react-hook-form keep validating field after unregister
My simplified user case is that my form has two field firstname and lastname with a buttom that will unregister/register lastname and another...
Read more >Managing React Forms in an easy and efficient way - Medium
The values of the fields are stored in a React state object throughout the handleChange method. ... React Hook Form comes with some...
Read more >Input Components - React-admin - Marmelab
For instance, when setting the variant prop on a <TextInput> component, ... form state value --> format --> form input value (string).
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Fork the
documentation
repo, send us a PR with some better explanation and information for the change. 👍Sure, just tell me how. I’d mention that in the migration guide from v6 to v7 as well and extend Material UI Sandbox by an example with Checkbox and FormControlLabel, was struggling to figure it out on my own.