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

Side by Side Diff: chrome/browser/resources/md_bookmarks/toolbar.js

Issue 2637023002: [MD Bookmarks] Add routing. (Closed)
Patch Set: Reuse the existing searchTerm and selectedId handlers for query change events. Created 3 years, 11 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 Polymer({ 5 Polymer({
6 is: 'bookmarks-toolbar', 6 is: 'bookmarks-toolbar',
7 7
8 properties: { 8 properties: {
9 searchTerm: { 9 searchTerm: {
10 type: String, 10 type: String,
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 * @param {Event} e 62 * @param {Event} e
63 * @private 63 * @private
64 */ 64 */
65 onSearchChanged_: function(e) { 65 onSearchChanged_: function(e) {
66 var searchTerm = /** @type {string} */ (e.detail); 66 var searchTerm = /** @type {string} */ (e.detail);
67 this.fire('search-term-changed', searchTerm); 67 this.fire('search-term-changed', searchTerm);
68 }, 68 },
69 69
70 /** @private */ 70 /** @private */
71 onSearchTermChanged_: function() { 71 onSearchTermChanged_: function() {
72 if (!this.searchTerm) 72 this.searchField.setValue(this.searchTerm || '');
73 this.searchField.setValue('');
74 }, 73 },
75 }); 74 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698