useFiledArray saves the previous form field value even if the component is not available in the dom #10588
Unanswered
anupkum100
asked this question in
Q&A
Replies: 1 comment 1 reply
-
You need to put Working demo: https://codesandbox.io/s/usefieldarray-typescript-v7-forked-9x7rp4?file=/src/App.tsx |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am working on a solution where I have a dropdown and depending on dropdown value selection I have to show dropdown or input or any other form field.
I am able to achieve the solution but the values of the previously added or selected value remains as it is.
eg reference
https://codesandbox.io/s/usefieldarray-typescript-v7-forked-g66wkr?file=/src/App.tsx
I have created a dropdown with option list and input.
If I select list it should show another dropdown --> WORKING
If I select option 1 it should be selected --> WORKING
If I select input it should show input box --> WORKING
Input box should have default value as "" --> NOT WORKING (It shows [object][object])
Beta Was this translation helpful? Give feedback.
All reactions