Skip to content

Commit e6db3c4

Browse files
Nickprogermportuga
authored andcommitted
Prevent uiGrid styles breaking, columns collapsing
Prevent uiGrid styles breaking(columns collapsing) for those cases when some uiGrids are invisible on page (in some hidden dialogs or tabs). We don't need to do gridResize() when grid is not visible.
1 parent cf779c8 commit e6db3c4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

packages/core/src/js/directives/ui-grid.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,9 @@ function uiGridDirective($window, gridUtil, uiGridConstants) {
338338

339339
// Resize the grid on window resize events
340340
function gridResize() {
341+
if (!$elm.is(':visible')) {
342+
return;
343+
}
341344
grid.gridWidth = $scope.gridWidth = gridUtil.elementWidth($elm);
342345
grid.gridHeight = $scope.gridHeight = gridUtil.elementHeight($elm);
343346

0 commit comments

Comments
 (0)