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

Unified Diff: chrome/browser/resources/md_history/history_toolbar.js

Issue 1974713002: [MD History] Unify query state in history-app. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@secondary_toolbar
Patch Set: address comments Created 4 years, 7 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_history/history_toolbar.js
diff --git a/chrome/browser/resources/md_history/history_toolbar.js b/chrome/browser/resources/md_history/history_toolbar.js
index d5341869f89648bc91a27d855b519a186de672f9..356866d0a0b7b8224911f2aa1bc2a8c8bf15cfa1 100644
--- a/chrome/browser/resources/md_history/history_toolbar.js
+++ b/chrome/browser/resources/md_history/history_toolbar.js
@@ -40,7 +40,7 @@ Polymer({
// as the user types.
searchTerm: {
type: String,
- value: ''
+ notify: true,
},
// True if waiting on the search backend.
@@ -86,6 +86,7 @@ Polymer({
setSearchTerm: function(search) {
if (this.searchTerm == search)
return;
+
this.searchTerm = search;
var searchField = /** @type {SearchField} */(this.$['search-input']);
searchField.showAndFocus().then(function(showing) {
@@ -97,10 +98,8 @@ Polymer({
* If the search term has changed reload for the new search.
*/
onSearch: function(searchTerm) {
- if (searchTerm != this.searchTerm) {
+ if (searchTerm != this.searchTerm)
this.searchTerm = searchTerm;
- this.fire('search-changed', {search: searchTerm});
- }
},
attached: function() {
« no previous file with comments | « chrome/browser/resources/md_history/history_list.js ('k') | chrome/test/data/webui/md_history/history_item_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698