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

Unified Diff: ui/webui/resources/cr_elements/network/cr_network_list.js

Issue 2306183002: Update cr-network-list iron-list when contents change (Closed)
Patch Set: Created 4 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/webui/resources/cr_elements/network/cr_network_list.js
diff --git a/ui/webui/resources/cr_elements/network/cr_network_list.js b/ui/webui/resources/cr_elements/network/cr_network_list.js
index 43af5690d0bcbf61b95f4fe59fb2c64a5ac0585b..e1ded9a75368a2ddc21ea7a51f96c61d2316f75d 100644
--- a/ui/webui/resources/cr_elements/network/cr_network_list.js
+++ b/ui/webui/resources/cr_elements/network/cr_network_list.js
@@ -70,11 +70,18 @@ Polymer({
behaviors: [CrScrollableBehavior],
+ observers: ['listChanged_(networks, customItems)'],
+
/** @private */
maxHeightChanged_: function() {
this.$.container.style.maxHeight = this.maxHeight + 'px';
},
+ /** @private */
+ listChanged_: function() {
+ this.updateScrollableContents();
+ },
+
/**
* Returns a combined list of networks and custom items.
* @return {!Array<!CrNetworkList.CrNetworkListItemType>}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698