I am at this point :)
http://blogs.msdn.com/b/rebond/archive/2012/07/18/knockout-js-binding-for-bootstrap-typeahead-plugin.aspx
ko.bindingHandlers.typeahead = {
init: function(element, valueAccessor) {
var binding = this;
var elem = $(element);
var value = valueAccessor();
elem.typeahead(
{
source: function() { return ko.utils.unwrapObservable(value.source); },
onselect: function(val) { value.target(val); }
});
elem.blur(function() { value.target(elem.val()); });
},
update: function(element, valueAccessor) {
var elem = $(element);
var value = valueAccessor();
elem.val(value.target());
}
};
I have class X with 4 properties.
I want to find an array of X objects over its 3 properties. (Other id property)
Any idea?
source
share