update components
This commit is contained in:
parent
02e924e3c5
commit
05b25af69f
55 changed files with 1554 additions and 907 deletions
|
@ -136,7 +136,8 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
},
|
||||
|
||||
observers: [
|
||||
'_updateSelected(attrForSelected, selected)'
|
||||
'_updateAttrForSelected(attrForSelected)',
|
||||
'_updateSelected(selected)'
|
||||
],
|
||||
|
||||
created: function() {
|
||||
|
@ -148,7 +149,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
this._observer = this._observeItems(this);
|
||||
this._updateItems();
|
||||
if (!this._shouldUpdateSelection) {
|
||||
this._updateSelected(this.attrForSelected,this.selected)
|
||||
this._updateSelected();
|
||||
}
|
||||
this._addListener(this.activateEvent);
|
||||
},
|
||||
|
@ -241,6 +242,12 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
this._setItems(nodes);
|
||||
},
|
||||
|
||||
_updateAttrForSelected: function() {
|
||||
if (this._shouldUpdateSelection) {
|
||||
this.selected = this._indexToValue(this.indexOf(this.selectedItem));
|
||||
}
|
||||
},
|
||||
|
||||
_updateSelected: function() {
|
||||
this._selectSelected(this.selected);
|
||||
},
|
||||
|
@ -310,7 +317,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
}
|
||||
|
||||
// Let other interested parties know about the change so that
|
||||
// we don't have to recreate mutation observers everywher.
|
||||
// we don't have to recreate mutation observers everywhere.
|
||||
this.fire('iron-items-changed', mutations, {
|
||||
bubbles: false,
|
||||
cancelable: false
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue