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

Unified Diff: chrome/browser/resources/md_bookmarks/list.js

Issue 2740863003: MD Bookmarks: Implement search and selection in new data flow system (Closed)
Patch Set: Review round 2 Created 3 years, 9 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 | « chrome/browser/resources/md_bookmarks/list.html ('k') | chrome/browser/resources/md_bookmarks/reducers.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/md_bookmarks/list.js
diff --git a/chrome/browser/resources/md_bookmarks/list.js b/chrome/browser/resources/md_bookmarks/list.js
index 83652a117a1d782a51fe16b96ec339fd7c507500..296620b786780922963bb95d2308d5634465bba8 100644
--- a/chrome/browser/resources/md_bookmarks/list.js
+++ b/chrome/browser/resources/md_bookmarks/list.js
@@ -13,8 +13,8 @@ Polymer({
/** @type {BookmarkNode} */
menuItem_: Object,
- /** @type {Array<string>} */
- displayedList: {
+ /** @private {Array<string>} */
+ displayedList_: {
type: Array,
value: function() {
// Use an empty list during initialization so that the databinding to
@@ -23,7 +23,8 @@ Polymer({
},
},
- searchTerm: String,
+ /** @private */
+ searchTerm_: String,
},
listeners: {
@@ -31,9 +32,12 @@ Polymer({
},
attached: function() {
- this.watch('displayedList', function(state) {
+ this.watch('displayedList_', function(state) {
return bookmarks.util.getDisplayedList(state);
});
+ this.watch('searchTerm_', function(state) {
+ return state.search.term;
+ });
this.updateFromStore();
},
@@ -113,12 +117,12 @@ Polymer({
/** @private */
emptyListMessage_: function() {
- var emptyListMessage = this.searchTerm ? 'noSearchResults' : 'emptyList';
+ var emptyListMessage = this.searchTerm_ ? 'noSearchResults' : 'emptyList';
return loadTimeData.getString(emptyListMessage);
},
/** @private */
isEmptyList_: function() {
- return this.displayedList.length == 0;
+ return this.displayedList_.length == 0;
},
});
« no previous file with comments | « chrome/browser/resources/md_bookmarks/list.html ('k') | chrome/browser/resources/md_bookmarks/reducers.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698