fix(hide-columns): check for content div in isEmptyColumn

This commit is contained in:
Sarah Vaupel 2019-12-02 19:44:15 +01:00 committed by Gregor Kleen
parent ff366a785b
commit 615555eb59

View File

@ -5,8 +5,6 @@ import './hide-columns.scss';
const HIDE_COLUMNS_CONTAINER_IDENT = 'uw-hide-columns';
const TABLE_HEADER_IDENT = 'uw-hide-column-header';
const ASYNC_TABLE_IDENT = 'uw-async-table';
const TABLE_UTILS_ATTR = 'table-utils';
const TABLE_UTILS_CONTAINER_SELECTOR = `[${TABLE_UTILS_ATTR}]`;
@ -232,7 +230,7 @@ export class HideColumns {
const cell = row.children[columnIndex];
if (cell.tagName === 'TH')
continue;
if (this._element.closest(`[${ASYNC_TABLE_IDENT}]`)) {
if (cell.querySelector('.table__td-content')) {
for (let child of cell.children) {
if (!isEmptyElement(child))
return false;