Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(95)

Unified Diff: third_party/polymer/v1_0/components-chromium/iron-selector/iron-multi-selectable-extracted.js

Issue 1862213002: Roll third_party/polymer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove obsolete appearance_browsertest.js, result of a previous bad merge. Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/polymer/v1_0/components-chromium/iron-selector/iron-multi-selectable-extracted.js
diff --git a/third_party/polymer/v1_0/components-chromium/iron-selector/iron-multi-selectable-extracted.js b/third_party/polymer/v1_0/components-chromium/iron-selector/iron-multi-selectable-extracted.js
index 38b18a869f2887733b152d4bf346e0366b67cf21..66da86debbeaf8703d14d0a3f0eaa12848b1e631 100644
--- a/third_party/polymer/v1_0/components-chromium/iron-selector/iron-multi-selectable-extracted.js
+++ b/third_party/polymer/v1_0/components-chromium/iron-selector/iron-multi-selectable-extracted.js
@@ -32,7 +32,7 @@
},
observers: [
- '_updateSelected(selectedValues)'
+ '_updateSelected(selectedValues.splices)'
],
/**
@@ -68,7 +68,7 @@
Polymer.IronSelectableBehavior._updateAttrForSelected.apply(this);
} else if (this._shouldUpdateSelection) {
this.selectedValues = this.selectedItems.map(function(selectedItem) {
- return this._indexToValue(this.indexOf(selectedItem));
+ return this._indexToValue(this.indexOf(selectedItem));
}, this).filter(function(unfilteredValue) {
return unfilteredValue != null;
}, this);
@@ -92,6 +92,13 @@
for (var i = 0; i < selectedItems.length; i++) {
this._selection.setItemSelected(selectedItems[i], true);
}
+ // Check for items, since this array is populated only when attached
+ if (this.fallbackSelection && this.items.length && !this._selection.get().length) {
+ var fallback = this._valueToItem(this.fallbackSelection);
+ if (fallback) {
+ this.selectedValues = [this.fallbackSelection];
+ }
+ }
} else {
this._selection.clear();
}
@@ -115,7 +122,6 @@
} else {
this.splice('selectedValues',i,1);
}
- this._selection.setItemSelected(this._valueToItem(value), unselected);
},
_valuesToItems: function(values) {

Powered by Google App Engine
This is Rietveld 408576698