2

I have a SimpleForm within an EditView, where the SimpleForm contains a DefaultOptionsField and a TextField.

The idea is to select an option in the DefaultOptionsField, which then updates the value of the TextField.

I can make this work by updating the TextField on DefaultOptionsField onChange using basic JavaScript, but I would prefer a more Admin-on-Rest and React-like way to set the TextField's value. Yet somehow the EditView layer seems to complicate things for me - I have yet to find a simple, clean and elegant way to make the TextField and DefaultOptionsField interact in that vein.

Is there maybe some basic example code of how I might structure such a solution within Admin-on-Rest?

1 Answers1

1

Your use case pretty much describes AOR Dependent input. Check it out here

https://github.com/marmelab/aor-dependent-input

kunal pareek
  • 1,285
  • 10
  • 21