Chromium Code Reviews| Index: chrome/browser/resources/settings/site_settings/site_data.js |
| diff --git a/chrome/browser/resources/settings/site_settings/site_data.js b/chrome/browser/resources/settings/site_settings/site_data.js |
| index 116ad3dfcd074c2dbd02a82cee564c8adef9f595..c1f180c68d1ac8444766b339e7f9566f754809a5 100644 |
| --- a/chrome/browser/resources/settings/site_settings/site_data.js |
| +++ b/chrome/browser/resources/settings/site_settings/site_data.js |
| @@ -74,16 +74,14 @@ Polymer({ |
| onSearchChanged_: function(e) { |
| this.filterString_ = e.detail; |
| this.$.list.render(); |
| - }, |
| - /** |
| - * Returns whether remove all should be shown. |
| - * @param {!Array<!CookieDataSummaryItem>} sites The sites list to use to |
| - * determine whether the button should be visible. |
| - * @private |
| - */ |
| - removeAllIsVisible_: function(sites) { |
| - return sites.length > 0; |
| + // There seems to be a bug in renderedItemCount where it is always 0 after |
|
tommycli
2016/09/26 23:01:34
why move this code from the computed binding?
Wou
Finnur
2016/09/27 14:14:34
Good question. I tried both ways before and this i
|
| + // the list has been rendered initially (with no filter string applied), but |
| + // then renderedItemCount matches the total |sites| count anyway. |
| + if (this.filterString_ == '') |
| + this.$.remove.hidden = this.sites.length == 0; |
| + else |
| + this.$.remove.hidden = this.$.list['renderedItemCount'] == 0; |
|
tommycli
2016/09/26 23:01:34
list.renderedItemCount?
Dan Beam
2016/09/27 00:12:27
this is why:
https://build.chromium.org/p/tryserve
Finnur
2016/09/27 14:14:34
Yup. Dan hit the nail on the head, but it is all m
|
| }, |
| /** |