Skip to content

Commit 78e44f9

Browse files
SobolievOleksiimportuga
authored andcommitted
fix(core): support jQlite
1 parent 30b26a9 commit 78e44f9

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ function uiGridDirective($window, gridUtil, uiGridConstants) {
338338

339339
// Resize the grid on window resize events
340340
function gridResize() {
341-
if (!$elm.is(':visible')) {
341+
if (!gridUtil.isVisible($elm)) {
342342
return;
343343
}
344344
grid.gridWidth = $scope.gridWidth = gridUtil.elementWidth($elm);

packages/core/src/js/services/ui-grid-util.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -457,6 +457,10 @@ module.service('gridUtil', ['$log', '$window', '$document', '$http', '$templateC
457457

458458
},
459459

460+
isVisible: function (elem) {
461+
return !!( elem[0].offsetWidth || elem[0].offsetHeight || elem[0].getClientRects().length )
462+
},
463+
460464
// Thanks to http://stackoverflow.com/a/13382873/888165
461465
getScrollbarWidth: function() {
462466
var outer = document.createElement("div");

0 commit comments

Comments
 (0)