Disable/hide fixed header when horizontal scrollbar displayed
Disable/hide fixed header when horizontal scrollbar displayed

I understand that the Fixed Header does not function properly when the horizontal scrollbar is shown. In a previous support session it was recommended I hide the fixed header element. Unfortunately my notes on this are rubbish! Can someone point me in the right direction? My notes are as follows in case they make sense to anyone else!
Step 1: Check if container is scrolling (container width compare)
Step 2: Add class to set fixed header element to display none (Body.hideHeader table.fixedHeader-floating { display: none !important; }
This question has an accepted answers - jump to answer
Answers
Use
fixedHeader.enable()
andfixedHeader.disable()
to enable and disable FixedHeader rather than setting your own classes.Allan
Thanks Allan! Works a treat:
`
var isHorizonalScrollbarVisible = false;
function AdjustFixedHeader() {
var isVisible = $('.TableContainer').get(0).scrollWidth > $('.TableContainer').innerWidth();
if (isHorizonalScrollbarVisible !== isVisible) {
table.fixedHeader.enable(!isVisible);
isHorizonalScrollbarVisible = isVisible;
}
}
$(window).resize(function () {
AdjustFixedHeader();
});
`