diff --git a/src/js/core/factories/Grid.js b/src/js/core/factories/Grid.js index f1e37e34aa..29462acc3a 100644 --- a/src/js/core/factories/Grid.js +++ b/src/js/core/factories/Grid.js @@ -1136,6 +1136,7 @@ angular.module('ui.grid') var self = this; var oldRows = self.rows.slice(0); var oldRowHash = self.rowHashMap || self.createRowHashMap(); + var allRowsSelected = true; self.rowHashMap = self.createRowHashMap(); self.rows.length = 0; @@ -1163,8 +1164,15 @@ angular.module('ui.grid') self.rows.push( newRow ); self.rowHashMap.put( newEntity, newRow ); + if (!newRow.isSelected) { + allRowsSelected = false; + } }); + if (self.selection) { + self.selection.selectAll = allRowsSelected; + } + self.assignTypes(); var p1 = $q.when(self.processRowsProcessors(self.rows))