Index: chrome/browser/resources/shared/js/cr/ui/table/table_header.js |
diff --git a/chrome/browser/resources/shared/js/cr/ui/table/table_header.js b/chrome/browser/resources/shared/js/cr/ui/table/table_header.js |
index 2fa8eaafc786b43afb9330f38469ac17ea4f8f77..d26f8fbbddc18c7455d14b1c3326c9c3f0e015a6 100644 |
--- a/chrome/browser/resources/shared/js/cr/ui/table/table_header.js |
+++ b/chrome/browser/resources/shared/js/cr/ui/table/table_header.js |
@@ -62,10 +62,25 @@ cr.define('cr.ui.table', function() { |
this.appendSplitters_(); |
}, |
+ batchCount_: 0, |
+ |
+ startBatchUpdates: function() { |
+ this.batchCount_++; |
+ }, |
+ |
+ endBatchUpdates: function() { |
+ this.batchCount_--; |
+ if (this.batchCount_ == 0) |
+ this.redraw(); |
+ }, |
+ |
/** |
* Redraws table header. |
*/ |
redraw: function() { |
+ if (this.batchCount_ != 0) |
+ return; |
+ |
var cm = this.table_.columnModel; |
var dm = this.table_.dataModel; |