issue: Append function not passing value into Input Elements nested inside element created with useFieldArray #12406
Unanswered
Avilaaiops
asked this question in
Q&A
Replies: 1 comment
-
Sandbox was private, updated link |
Beta Was this translation helpful? Give feedback.
0 replies
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.
Uh oh!
There was an error while loading. Please reload this page.
-
Version Number
7.51.4
Codesandbox/Expo snack
https://codesandbox.io/p/sandbox/valuesetbug-wzrq9p
Steps to reproduce
Line One
Line Two
Line Three
+ Container
+ ContainerAnswer
inside of the container card you created in step 3Expected behaviour
Pasting a multiline string entry triggers the
onPaste
event hook in the textbox that passese
into theanswerPaste
function. This splits the multiline string on the\n
delimiter and creates a string array with a string for each line. Each string is then passed into anappend
function for React Hook Form.This allows a user to copy multiline text from an external source and create a new textbox for each line of text.
In the default textbox that appears at the top of the screen, this works as expected. Input elements are creating and are populated with the content of the multiline text copied.
However, when you create a container and add a textbox to that container, the pasting creates an amount of textboxes equal to the number of lines copied, but their value remains blank.
What browsers are you seeing the problem on?
No response
Relevant log output
Code of Conduct
Beta Was this translation helpful? Give feedback.
All reactions