You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When typing in the form input fields, there is a target["value"] for every key stroke, but as seen by the form's show method logs, form.field->Field.show no updates are being stored to the form.
VDO:
login_None_NOT-work.mov
Expected Behavior
form.field should always update when input field.action.set(value) is called.
Working Example
If we provide Form.use(.~init=Some(Field.input), ...) and the FieldType is not FieldArray, the form is working as expected. FieldArray's bugs will be noted in a different git-hub issue.
let init: Field.input = {
username: "",
password: "",
}
let form = `Form.use(.`
~context=contextValidate,
~init=some(init),
~validateInit=false,
)
Description
When a user supplies an
~init=None, subsequent updates made to the form viafield.actions.set(value)do not result in form Store updates or changes.Reproduction
Example File: rescript-fields/examples/login/Login.res
Using the example files and documentation, calling a
field.actions.set()from anonChangeis not setting values to the form.Form Instantiation:
Handler Verification:
When typing in the form input fields, there is a
target["value"]for every key stroke, but as seen by the form'sshowmethod logs,form.field->Field.showno updates are being stored to the form.VDO:
login_None_NOT-work.mov
Expected Behavior
form.fieldshould always update when inputfield.action.set(value)is called.Working Example
If we provide
Form.use(.~init=Some(Field.input), ...)and the FieldType is notFieldArray, the form is working as expected.FieldArray's bugs will be noted in a different git-hub issue.VDO:
login_some-obj_WORK.mov