Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFR] Dependent choice lists #398

Merged
merged 7 commits into from
Apr 15, 2015
Merged

[RFR] Dependent choice lists #398

merged 7 commits into from
Apr 15, 2015

Conversation

fzaninotto
Copy link
Member

This opens up contextual select tags, e.g. cascading selects.

e.g to create a cascading set of 'state' and 'city' fields, you can now do that:

 nga.field('state', 'choice').choices(states),
 nga.field('city', 'choice').choices(function(entry) {
     return cities.filter(function(city) { return city.state === entry.values.state;} );
 })

given

 var states = [ { value:'WA', label:'Washington'}, ... ];
 var cities = [ { value:'Bellevue', label: 'Bellevue', state: 'WA'} , ... ];

Supersedes #364

@fzaninotto
Copy link
Member Author

The new e2e tests may fail because the json server used by saucelabs isn't up to date with this PR. Will be done once it is merged.

jeromemacias added a commit that referenced this pull request Apr 15, 2015
@jeromemacias jeromemacias merged commit be6a8c8 into master Apr 15, 2015
@jeromemacias jeromemacias deleted the kenegozi-master branch April 15, 2015 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants