Hi guys,
I have two combobox that contains countries and cities
<ComboBox Options="{Clear countries}" Selected="{Clear favCountry}"/>
<ComboBox Options="{Clear citiesObs.cities}" Selected="{Clear favCity}" />
When i select a country from the first combobox, the second combobox cities are updated automatically.
This works perfectly in the previous version using this code.
//locations is an observable locations=Observable([{"country":"Afghanistan","cities":["Kabul","Achin",....]},{"country":"Ecuador","cities":["Quito","Guayaquil","Cuenca"...]}....]);
favCountry.onValueChanged(module,function(selectedValue) {
citiesObs.value=locations.where({country: selectedValue});
}
but in v0.36 this don’t work anymore .
I tried to replace citiesObs.value with citiesObs but it work only when the country is a string (for example “Afghanistan”) and not with the variable selectedValue.
favCountry.onValueChanged(module,function(selectedValue) {
citiesObs=locations.where({country: "Afghanistan"});
}