I'm making a custom input component that needs to change when other input values are changed in the form.
<ReferenceInput source="foo">
<SelectInput />
</ReferenceInput>
<NumberInput onChange={(e, newValue) => {this.setState({ newValue })} />
<CustomInput numberValue={this.state.newValue} />
When NumberInput
changes, I can pass CustomInput
the new value. But ReferenceInput / SelectInput
doesn't have an onChange
. How do I get the new value of SelectInput
to the CustomInput
? (Note that inside CustomInput
, props.record.foo
doesn't update when ReferenceInput
changes.)
Check out aor dependent input