How can I implement Cascading Select?
I'm trying to build a create form where the user has to choose a department in a way of cascading select.
Say the data is modeled like this:
- Account
-
- Company
-
-
- Department
-
-
-
-
- Employee
-
-
In my "Create Employee" form I want to have a cascading select for the Department so that I first have to choose the Account, then the Company filtered by the selected Account and lastly the Department filtered by the selected Company.
I tried implementing it with the filter prop on ReferenceInput and the component's state but it only works for the initial state. Any suggestions?
Thanks!
https://github.com/marmelab/aor-dependent-input
Thanks @Balipeace, but I wanted to know if there's an AOR way of doing this, one which takes into consideration the resources and applies the filters on the dependent select.
aor-dependent-input offers a possible ad-hoc implementation but is there any chance of adding such a feature soon?
aor-dependent-input was created and is maintained by the same team as aor. We don't intend to bring it into core.