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

Unified Diff: chrome/browser/resources/md_extensions/item_list.js

Issue 2974583003: MD Extensions: Show messages for no extensions, and for no search results (Closed)
Patch Set: Created 3 years, 5 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/md_extensions/item_list.js
diff --git a/chrome/browser/resources/md_extensions/item_list.js b/chrome/browser/resources/md_extensions/item_list.js
index 109feeb337010a5799fe1b28548e582c9e6fbe60..8794ab286cd41247049166d236a9c1a3d5546fbd 100644
--- a/chrome/browser/resources/md_extensions/item_list.js
+++ b/chrome/browser/resources/md_extensions/item_list.js
@@ -21,6 +21,12 @@ cr.define('extensions', function() {
},
filter: String,
+
+ /** @private */
dpapad 2017/07/07 00:45:04 Can we annotate what does the array hold? !Array<S
scottchen 2017/07/07 23:08:42 Done.
+ shownItems_: {
+ type: Array,
+ computed: 'computeShownItems_(items.*, filter)',
+ }
},
listeners: {
@@ -73,6 +79,10 @@ cr.define('extensions', function() {
return item.name.toLowerCase().includes(this.filter.toLowerCase());
}, this);
},
+
+ isEmpty_: function(length) {
+ return length == 0;
+ }
});
return {

Powered by Google App Engine
This is Rietveld 408576698