mirror of
https://github.com/apache/superset.git
synced 2026-04-18 23:55:00 +00:00
Fix datatable scroll height when using filter or pagination (#3377)
This commit is contained in:
committed by
Maxime Beauchemin
parent
c3ab796734
commit
42dd64e413
@@ -123,7 +123,11 @@ 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 filterHeight = $tableDom.find('.dataTables_filter').height() || 0;
|
||||
const pageLengthHeight = $tableDom.find('.dataTables_length').height() || 0;
|
||||
const paginationHeight = $tableDom.find('.dataTables_paginate').height() || 0;
|
||||
const controlsHeight = (pageLengthHeight > filterHeight) ? pageLengthHeight : filterHeight;
|
||||
$tableDom.find('.dataTables_scrollBody').css('max-height', height - headHeight - controlsHeight - paginationHeight);
|
||||
};
|
||||
|
||||
export function d3format(format, number) {
|
||||
|
||||
Reference in New Issue
Block a user