smart search for $input in typeahead
This commit is contained in:
@ -49,8 +49,12 @@ $(function(){
|
|||||||
|
|
||||||
$.extend(Constructor.prototype, {
|
$.extend(Constructor.prototype, {
|
||||||
renderList: function() {
|
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;
|
this.options.typeahead.source = this.sourceData;
|
||||||
|
|
||||||
|
//apply typeahead
|
||||||
this.$input.typeahead(this.options.typeahead);
|
this.$input.typeahead(this.options.typeahead);
|
||||||
|
|
||||||
//attach own render method
|
//attach own render method
|
||||||
|
Reference in New Issue
Block a user