I have 2 dropdownlists and one list of result with a binding using computed observable function something like this:
self.Records = ko.computed(function() {
if (self.dropdown1 !== undefined) {
...
return Collection[0];
}
if (self.dropdown2() != undefined) {
...
return Collection[0];
}
});
But my problem is that I need to set in undefined the value on self.dropdown1 when I change the valie of the dropdownlist2, for my Collection of records can change.
I'm changing the value of the first dropdown with jquery like this:
$('#reportTypeSelection').prop('selectedIndex', 0);
But the binding is not refreshing. Any advices please.