formly-js / angular-formly

JavaScript powered forms for AngularJS
http://docs.angular-formly.com
MIT License
2.22k stars 405 forks source link

Cascading select dropdown #750

Open suny5 opened 7 years ago

suny5 commented 7 years ago

I want to create a cascading drop down in ng2 formly for angular 2 project can you please find some solution for that. I am using below ng2 formly json for that but it's not working.please help for this.

[{ "key": "firstName", "type": "input", "model": "formState", "templateOptions": { "label": "Filter First Name", "placeholder": "Try: \"Wil\"" } }, { "key": "selectedPerson", "type": "select", "templateOptions": { "label": "Person", "options": [{ "label": "Wilcox Christian", "id": "acosta_cantu" }, { "label": "Freda Melendez", "id": "ballard_todd" }, { "label": "Suzette Velazquez", "id": "reilly_lamb" }, { "label": "Roberson Downs", "id": "dalton_davidson" }, { "label": "Brandi Hatfield", "id": "angela_curtis" }, { "label": "Ingram Webster", "id": "graciela_lott" }, { "label": "Essie Sharpe", "id": "velasquez_townsend" }, { "label": "Williams Briggs", "id": "rosanne_graves" }, { "label": "Cook Newman", "id": "patricia_wood" }, { "label": "Francis Stewart", "id": "haynes_munoz" }, { "label": "Barrera Bass", "id": "carney_cruz" }, { "label": "Lakisha Rosario", "id": "elise_shelton" }, { "label": "Brandie Clay", "id": "harriett_morrow" }, { "label": "Kristie Landry", "id": "burt_griffith" }, { "label": "Jaclyn Mueller", "id": "carpenter_reyes" }, { "label": "Roseann Trujillo", "id": "ellis_fernandez" }, { "label": "Liza Howe", "id": "flores_lowery" }, { "label": "Walton Kinney", "id": "carolina_arnold" }, { "label": "Bauer Marshall", "id": "keller_macdonald" }, { "label": "Rena Foster", "id": "brown_schneider" } ], "Options" : "option.id as option.label in options | filter:formState.firstName" } }
]

egucciar commented 7 years ago

Hi, this is angular 1 formly. Please see: https://github.com/formly-js/ng-formly