If you have dependent lists, that's a great reason to use can.compute. Using a compute in your dependent list you can respond to the changes in the parent dropdown. For example, let's say your parent sets a property called 'selected' on some state map you have, you could then do (pseudocode):
- var data = new can.Map({selected: 'some default'});
- var child = can.compute(function() {
- var cityName = data.attr('selected');
- var list = new Cities.List([]);
- Cities.findAll({ name: cityName }).then(function(newList) {
- list.replace(newList);
- });
- return list;
- });
When data.selected gets set, the child list will automatically recompute itself. Does that make sense?