44
44
deregFunctions . push ( $scope . $parent . $watch ( $scope . uiGrid . data , dataWatchFunction ) ) ;
45
45
deregFunctions . push ( $scope . $parent . $watch ( function ( ) {
46
46
if ( self . grid . appScope [ $scope . uiGrid . data ] ) {
47
- return self . grid . appScope [ $scope . uiGrid . data ] . length ;
47
+ return self . grid . appScope [ $scope . uiGrid . data ] . length ;
48
48
} else {
49
49
return undefined ;
50
- }
50
+ }
51
51
} , dataWatchFunction ) ) ;
52
52
} else {
53
53
deregFunctions . push ( $scope . $parent . $watch ( function ( ) { return $scope . uiGrid . data ; } , dataWatchFunction ) ) ;
63
63
}
64
64
deregFunctions . push ( $scope . $parent . $watchCollection ( function ( ) { return $scope . uiGrid . columnDefs ; } , columnDefsWatchFunction ) ) ;
65
65
}
66
-
66
+
67
67
68
68
function columnDefsWatchFunction ( n , o ) {
69
69
if ( n && n !== o ) {
81
81
function dataWatchFunction ( newData ) {
82
82
// gridUtil.logDebug('dataWatch fired');
83
83
var promises = [ ] ;
84
-
84
+
85
85
if ( self . grid . options . fastWatch ) {
86
86
if ( angular . isString ( $scope . uiGrid . data ) ) {
87
87
newData = self . grid . appScope [ $scope . uiGrid . data ] ;
88
88
} else {
89
89
newData = $scope . uiGrid . data ;
90
90
}
91
91
}
92
-
92
+
93
93
if ( newData ) {
94
94
// columns length is greater than the number of row header columns, which don't count because they're created automatically
95
95
var hasColumns = self . grid . columns . length > ( self . grid . rowHeaderColumns ? self . grid . rowHeaderColumns . length : 0 ) ;
@@ -277,7 +277,7 @@ function uiGridDirective($compile, $templateCache, $timeout, $window, gridUtil,
277
277
grid . gridHeight = $scope . gridHeight = gridUtil . elementHeight ( $elm ) ;
278
278
279
279
// If the grid isn't tall enough to fit a single row, it's kind of useless. Resize it to fit a minimum number of rows
280
- if ( grid . gridHeight < grid . options . rowHeight && grid . options . enableMinHeightCheck ) {
280
+ if ( grid . gridHeight <= grid . options . rowHeight && grid . options . enableMinHeightCheck ) {
281
281
autoAdjustHeight ( ) ;
282
282
}
283
283
@@ -291,7 +291,7 @@ function uiGridDirective($compile, $templateCache, $timeout, $window, gridUtil,
291
291
var contentHeight = grid . options . minRowsToShow * grid . options . rowHeight ;
292
292
var headerHeight = grid . options . showHeader ? grid . options . headerRowHeight : 0 ;
293
293
var footerHeight = grid . calcFooterHeight ( ) ;
294
-
294
+
295
295
var scrollbarHeight = 0 ;
296
296
if ( grid . options . enableHorizontalScrollbar === uiGridConstants . scrollbars . ALWAYS ) {
297
297
scrollbarHeight = gridUtil . getScrollbarWidth ( ) ;
0 commit comments