smart search for $input in typeahead

This commit is contained in:
vitalets 2013-01-14 17:47:48 +04:00
parent 67121bc646
commit 0b58607306

@ -49,13 +49,17 @@ $(function(){
$.extend(Constructor.prototype, {
renderList: function() {
this.$input = this.$tpl.is('input') ? this.$tpl : this.$tpl.find('input[type="text"]');
//set source of typeahead
this.options.typeahead.source = this.sourceData;
//apply typeahead
this.$input.typeahead(this.options.typeahead);
//attach own render method
this.$input.data('typeahead').render = $.proxy(this.typeaheadRender, this.$input.data('typeahead'));
this.renderClear();
this.setClass();
this.setAttr('placeholder');