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

Unified Diff: ui/webui/resources/cr_elements/cr_toolbar/cr_toolbar_search_field.js

Issue 2032313002: MD WebUI: Add loading spinner to cr-toolbar, hook into MD History toolbar (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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: ui/webui/resources/cr_elements/cr_toolbar/cr_toolbar_search_field.js
diff --git a/ui/webui/resources/cr_elements/cr_toolbar/cr_toolbar_search_field.js b/ui/webui/resources/cr_elements/cr_toolbar/cr_toolbar_search_field.js
index 1729ff9d062bb8cb55020f9a0e78aa98efa59231..386925d0cc9ea577e81adfbc1f2030dbd0ac22e0 100644
--- a/ui/webui/resources/cr_elements/cr_toolbar/cr_toolbar_search_field.js
+++ b/ui/webui/resources/cr_elements/cr_toolbar/cr_toolbar_search_field.js
@@ -19,6 +19,13 @@ Polymer({
// Tooltip to display on the clear search button.
clearLabel: String,
+
+ // When true, show a loading spinner to indicate that the backend is
+ // processing the search. Will only show if the search field is open.
+ processing: {
+ type: Boolean,
+ reflectToAttribute: true
+ },
},
listeners: {
@@ -34,6 +41,10 @@ Polymer({
return narrow ? 0 : -1;
},
+ isSpinnerActive_: function(processing, showingSearch) {
+ return processing && showingSearch;
+ },
+
/** @private */
onInputBlur_: function() {
if (!this.hasSearchText)

Powered by Google App Engine
This is Rietveld 408576698