diff --git a/frontend/src/utils/hide-columns/hide-columns.js b/frontend/src/utils/hide-columns/hide-columns.js index fd3c94d32..a6743bd8b 100644 --- a/frontend/src/utils/hide-columns/hide-columns.js +++ b/frontend/src/utils/hide-columns/hide-columns.js @@ -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', () => {