Skip to content

Commit 6e6587b

Browse files
Updating codebase as per @prabhjyotsingh comments
--There is a horizontal scrollbar --When i scroll, table data goes above header Signed-off-by: ankur_jain <[email protected]>
1 parent aea8446 commit 6e6587b

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

zeppelin-web/bower.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@
3131
"ng-focus-if": "~1.0.2",
3232
"bootstrap3-dialog": "bootstrap-dialog#~1.34.7",
3333
"floatThead": "~1.3.2",
34-
"datatables.net-bs": "^1.10.11",
35-
"datatables.net-buttons-bs": "^1.1.2"
34+
"datatables.net-bs": "~1.10.11",
35+
"datatables.net-buttons-bs": "~1.1.2"
3636
},
3737
"devDependencies": {
3838
"angular-mocks": "1.3.8"

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1191,7 +1191,7 @@ angular.module('zeppelinWebApp')
11911191

11921192
var renderTable = function() {
11931193
var html = '';
1194-
html += '<table class="table table-hover table-condensed" cellspacing="0" width="100%">';
1194+
html += '<table class="table table-hover table-condensed compact display">';
11951195
html += ' <thead>';
11961196
html += ' <tr style="background-color: #F6F6F6; font-weight: bold;">';
11971197
for (var titleIndex in $scope.paragraph.result.columnNames) {
@@ -1221,6 +1221,8 @@ angular.module('zeppelinWebApp')
12211221
angular.element('#p' + $scope.paragraph.id + '_table').children(1).DataTable({
12221222
paging: false,
12231223
info: false,
1224+
autoWidth: true,
1225+
lengthChange: false,
12241226
dom: '<"row"<"col-sm-6"B><"col-sm-6"f>>'+
12251227
'<"row"<"col-sm-12"t>>',
12261228
buttons: [

zeppelin-web/src/app/notebook/paragraph/paragraph.css

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,15 @@
4848
margin-bottom: 0;
4949
}
5050

51+
table.dataTable {
52+
/* clear: both; */
53+
margin-top: 0px !important;
54+
margin-bottom: 6px !important;
55+
/* max-width: none !important; */
56+
}
57+
div.dataTables_wrapper{
58+
overflow: hidden;
59+
}
5160
.paragraph p {
5261
margin: 0;
5362
}

0 commit comments

Comments
 (0)