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

Unified Diff: chrome/browser/resources/settings/internet_page/network_apnlist.js

Issue 2422423002: Use md-select instead of paper-dropdown-menu-light in internet page (Closed)
Patch Set: Created 4 years, 2 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: chrome/browser/resources/settings/internet_page/network_apnlist.js
diff --git a/chrome/browser/resources/settings/internet_page/network_apnlist.js b/chrome/browser/resources/settings/internet_page/network_apnlist.js
index c6270f6b9de1f9f9c1efcb7ab83940ddc85b64c5..afb0015650508cb97947fece95c4d145caf91bab 100644
--- a/chrome/browser/resources/settings/internet_page/network_apnlist.js
+++ b/chrome/browser/resources/settings/internet_page/network_apnlist.js
@@ -141,9 +141,7 @@ Polymer({
this.apnSelectList_ = result;
this.selectedApn_ =
(activeApn && activeApn.AccessPointName) || otherApn.AccessPointName;
- // We need to flush the DOM here, otherwise the paper-dropdown-menu-light
dpapad 2016/10/17 22:57:05 Native <select> has the same problem described by
stevenjb 2016/10/17 23:10:19 Hrm, yeah, you're right, I need to us async() here
- // will not update to correctly display the selected AccessPointName.
- Polymer.dom.flush();
+ this.$.selectApn.value = this.selectedApn_;
},
/**
@@ -177,16 +175,17 @@ Polymer({
/**
* Event triggered when the selectApn selection changes.
- * @param {!{detail: !{selected: string}}} event
+ * @param {!{target: !{value: string}}} event
dpapad 2016/10/17 22:57:05 I think the proper way to type annotate this is as
stevenjb 2016/10/17 23:10:19 Sure. Done.
* @private
*/
onSelectApnChange_: function(event) {
- /** @type {string} */ var accessPointName = event.detail.selected;
+ var accessPointName = event.target.value;
// When selecting 'Other', don't set a change event unless a valid
// non-default value has been set for Other.
if (this.isOtherSelected_(accessPointName) &&
(!this.otherApn_ || !this.otherApn_.AccessPointName ||
this.otherApn_.AccessPointName == this.DefaultAccessPointName)) {
+ this.selectedApn_ = accessPointName;
return;
}
this.sendApnChange_(accessPointName);

Powered by Google App Engine
This is Rietveld 408576698