fix(hide-columns): correctly hide hiders of previously hidden columns
This commit is contained in:
parent
c2eb9fbc17
commit
364991c42b
@ -86,6 +86,9 @@ export class HideColumns {
|
|||||||
const pR = this._tableHiderContainer.getBoundingClientRect();
|
const pR = this._tableHiderContainer.getBoundingClientRect();
|
||||||
hider.style.left = (thR.left + thR.width/2 - hR.width/2 - pR.left) + 'px';
|
hider.style.left = (thR.left + thR.width/2 - hR.width/2 - pR.left) + 'px';
|
||||||
hider.style.top = (thR.top - pR.top + 5 +50) + '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) {
|
setupHideButton(th, prevHidden) {
|
||||||
@ -105,9 +108,7 @@ export class HideColumns {
|
|||||||
this.switchColumnDisplay(th, hider);
|
this.switchColumnDisplay(th, hider);
|
||||||
|
|
||||||
// recompute position for every table hider
|
// recompute position for every table hider
|
||||||
this._tableHiderContainer.getElementsByClassName(TABLE_HIDER_CLASS).forEach(hider => {
|
this._tableHiderContainer.getElementsByClassName(TABLE_HIDER_CLASS).forEach(hider => this.hideHiderBehindHeader(hider));
|
||||||
this.hideHiderBehindHeader(hider);
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
th.addEventListener('mouseover', () => {
|
th.addEventListener('mouseover', () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user