Skip to content

mapFromValue does not work, sends syntheticEvent instead of value #156

@ghost

Description

Example:

 <Form.Field
                id="eMail"
                name="eMail"
                placeholder="Email"
                className="form-control"
                autoComplete="email"
                errorClass="is-invalid"
                value={model.Email}
                mapFromValue={
                  emailValue => {
                    console.log("email value: ", emailValue);
                    return emailValue;
                  }
                }
              />

mapFromValue does not work as expected and as written in documentation:

<Form.Field
  name='name'
  mapFromValue={fieldValue => fieldValue.first + ' ' + fieldValue.last}
/>

fieldValue in this example is received as syntheticEvent.

email value:  SyntheticEvent {dispatchConfig: {…}, _targetInst: FiberNode, nativeEvent: InputEvent, type: "change", target: input#eMail.form-control, …}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions