Skip to content

Commit

Permalink
fix the item template class init
Browse files Browse the repository at this point in the history
  • Loading branch information
NeilujD committed Jun 2, 2017
1 parent d6ea282 commit ab518b6
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions paper-autocomplete-input.html
Original file line number Diff line number Diff line change
Expand Up @@ -536,21 +536,7 @@
* @type Object
* @readOnly
*/
_itemTemplateClass: {
type: Object,
readOnly: true,
value: function() {
var template = Polymer.dom(this).querySelector('template:not(#defaultTemplate)');
var dataHost = this.parentNode;

if (!template) {
template = this.$.defaultTemplate;
dataHost = this;
}

return Polymer.Templatize.templatize(template, dataHost);
}
},
_itemTemplateClass: Object,

/**
* permit to hide the loading bar
Expand Down Expand Up @@ -583,6 +569,18 @@
}
},

ready: function () {
var template = Polymer.dom(this).querySelector('template:not(#defaultTemplate)');
var dataHost = this.parentNode;

if (!template) {
template = this.$.defaultTemplate;
dataHost = this;
}

this.set("_itemTemplateClass", Polymer.Templatize.templatize(template, dataHost));
},

_onItemTap: function (e, detail) {
this.set('selectedItem', e.model.item);
},
Expand Down Expand Up @@ -636,6 +634,8 @@
return;
}

this.value = this.value || "";

if (this.value.length < this.firstRequestStart) return;

var that = this;
Expand Down

0 comments on commit ab518b6

Please sign in to comment.