Ok, I didn't explain it clearly.
So I have a list of search fields, if I need display keywords search box on one place, and age search box on another. What data-bind I can use?
If the field is static, I can add something like
<input class="form_field_input" type="text" placeholder="Keywords" value="" data-bind="value: filter_keywords ">
but since the fields are dynamic, I would like to add like
<input class="form_field_input" type="text" placeholder="Keywords" value="" data-bind="value: filters['keywords'] ">
If I can do like that, how do I put it in computed so changes can be pick
self.filter=ko.computed(function(){
var v='';
for(var searchField in searchFields){ // 'keywords' in one item in searchFields
v += filters[searchField.name];
}
....
I tested with code like that, but seems the changes didn't trigger the computed.