ko.dependentobservable

Manually get knockout to re-evaluate a dependantObservable

ⅰ亾dé卋堺 提交于 2019-12-29 04:29:08
问题 I am not sure if this is possible, but I have a scenario where I have a validation system which notifies my validation system when something has become valid/invalid via a dependant observable. Now this works great when a user is filling out a form as the dependantObservable is driven off the underlying observables value changing. (i.e if the Name property changes, it will re-evaluate the isValid dependant observable, which will in turn notify my binding which hooks into the validation system

Dependant Observable Array in Knockout JS

我与影子孤独终老i 提交于 2019-12-11 11:05:31
问题 I have started to play around with knockoutjs and do some simple binding/dependant binding. My goal is to have 1 <select> list populated based on the value of another <select> list. Both are being loaded from an ajax call to my asp.net webservice. So I have two <select> lists <select id="make" data-bind="options: availableMakes, value: selectedMake, optionsText: 'text', optionsCaption: 'Choose a make'"></select> <select id="model" data-bind="options: availableModels, value: selectedModel,