-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed
Description
Is your feature request related to a problem? Please describe.
There are edge cases in which it can be important to bind two fields to the same data key.
Describe the solution you'd like
When creating a form, I'd like to be able to do e.g. this:
<Form elements={[
{
key: "field",
name: "This field has a validator that will pass after 1 second",
type: DemoFieldString,
validator: () => pass(1000, "Awesome")
},
{
key: "field",
name: "This field has a validator that will pass after 0-1.5 seconds",
type: DemoFieldString,
validator: () => pass(Math.random() * 1500, "Awesome")
}
]} data={{}} onSubmit={action("onSubmit")} />And let both fields have the same value.
Describe alternatives you've considered
The alternative would be to listen to the onChange event and modify the data passed into the form. Could work, but not pretty.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed
