Skip to content

Commit

Permalink
they work!!!
Browse files Browse the repository at this point in the history
  • Loading branch information
Malcolm Flint committed Aug 18, 2017
1 parent 132377f commit 6c2d2be
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion superset/assets/javascripts/modules/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,12 @@ export function toggleCheckbox(apiUrlPrefix, selector) {
*/
export const fixDataTableBodyHeight = function ($tableDom, height) {
const headHeight = $tableDom.find('.dataTables_scrollHead').height();
$tableDom.find('.dataTables_scrollBody').css('max-height', height - headHeight);
const headerFooterHeight = $tableDom.find('.table-header').height() +
$tableDom.find('.table-footer').height();
$tableDom.find('.dataTables_scrollBody').css('max-height', height - (headerFooterHeight + headHeight));
$tableDom.find('.table-body').css('max-height', height - headerFooterHeight);
$tableDom.find('.dataTables_scroll').css('max-height', height - headerFooterHeight);
$tableDom.find('.table-data').css('max-height', height - headerFooterHeight);
};

export function d3format(format, number) {
Expand Down
2 changes: 1 addition & 1 deletion superset/assets/visualizations/table.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function tableVis(slice, payload) {
const table = div.append('table')
.classed(
'dataframe dataframe table table-striped table-bordered ' +
'table-condensed table-hover dataTable no-footer', true)
'table-condensed table-hover dataTable', true)
.attr('width', '100%');

const cols = data.columns.map(c => slice.datasource.verbose_map[c] || c);
Expand Down

0 comments on commit 6c2d2be

Please sign in to comment.