Form.Input and Form.Textarea value prop is not reactive
gprieto opened this issue · 1 comments
gprieto commented
I have a form where I want to reactively assign the value for a field, like so:
<Form.Field {config} name="content">
<Form.Item >
<Form.Input value={$content} />
<Form.Validation />
</Form.Item>
</Form.Field>
It seems that in this scenario the value of the field "content" is only updated on mount and not on the following changes of $content
.
I tried to bind the prop, but then what happens is that the initial state of the field value which is an empty string, overwrites my store value $content
.
huntabyte commented
The <Form.Input />
was not designed to be used in this manner. If you're using it, it will automatically take on the value of that specific field in the form via the Superform store.