fix(hide-columns): correctly hide hiders of previously hidden columns

This commit is contained in:
Sarah Vaupel 2019-11-29 17:18:28 +01:00 committed by Gregor Kleen
parent c2eb9fbc17
commit 364991c42b

View File

@ -86,6 +86,9 @@ export class HideColumns {
const pR = this._tableHiderContainer.getBoundingClientRect();
hider.style.left = (thR.left + thR.width/2 - hR.width/2 - pR.left) + 'px';
hider.style.top = (thR.top - pR.top + 5 +50) + 'px';
// remove visible class if necessary
hider.classList.remove('table-hider--visible');
}
setupHideButton(th, prevHidden) {
@ -105,9 +108,7 @@ export class HideColumns {
this.switchColumnDisplay(th, hider);
// recompute position for every table hider
this._tableHiderContainer.getElementsByClassName(TABLE_HIDER_CLASS).forEach(hider => {
this.hideHiderBehindHeader(hider);
});
this._tableHiderContainer.getElementsByClassName(TABLE_HIDER_CLASS).forEach(hider => this.hideHiderBehindHeader(hider));
});
th.addEventListener('mouseover', () => {