Skip to content

Commit f8123c5

Browse files
committed
Fixed scrollbar when the first Mouseover does not appear in the Table.
1 parent bf16e1a commit f8123c5

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -972,6 +972,9 @@ angular.module('zeppelinWebApp')
972972
angular.element('#p' + $scope.paragraph.id + '_table').html(html);
973973
if ($scope.paragraph.result.msgTable.length > 10000) {
974974
angular.element('#p' + $scope.paragraph.id + '_table').css('overflow', 'scroll');
975+
// set table height
976+
var height = $scope.paragraph.config.graph.height;
977+
angular.element('#p' + $scope.paragraph.id + '_table').css('height', height);
975978
} else {
976979
var dataTable = angular.element('#p' + $scope.paragraph.id + '_table .table');
977980
dataTable.floatThead({
@@ -981,13 +984,15 @@ angular.module('zeppelinWebApp')
981984
});
982985
angular.element('#p' + $scope.paragraph.id + '_table').css('position', 'relative');
983986
angular.element('#p' + $scope.paragraph.id + '_table').css('height', '100%');
984-
angular.element('.ps-scrollbar-y-rail').css('z-index', '1002');
985987
angular.element('#p' + $scope.paragraph.id + '_table').perfectScrollbar('destroy');
986988
angular.element('#p' + $scope.paragraph.id + '_table').perfectScrollbar();
989+
angular.element('.ps-scrollbar-y-rail').css('z-index', '1002');
990+
// set table height
991+
var height = $scope.paragraph.config.graph.height;
992+
angular.element('#p' + $scope.paragraph.id + '_table').css('height', height);
993+
angular.element('#p' + $scope.paragraph.id + '_table').perfectScrollbar('update');
987994
}
988-
// set table height
989-
var height = $scope.paragraph.config.graph.height;
990-
angular.element('#p' + $scope.paragraph.id + '_table').css('height', height);
995+
991996
};
992997

993998
var retryRenderer = function() {

0 commit comments

Comments
 (0)