fix position of sticky table header when titlebar present

This commit is contained in:
jeffvli 2025-05-06 03:27:30 -07:00
parent b265f2817b
commit 35ee7e4606
2 changed files with 6 additions and 2 deletions

View file

@ -30,13 +30,13 @@ export const useFixedTableHeader = ({ enabled }: { enabled: boolean }) => {
const root = document.querySelector('main .ag-root');
if (!isTableHeaderInView && isTableInView) {
header?.classList.add('ag-header-fixed');
header?.classList.add('ag-header-fixed', 'ag-header-window-bar');
root?.classList.add('ag-header-fixed-margin');
} else if (!isTableInView) {
header?.classList.remove('ag-header-fixed');
root?.classList.remove('ag-header-fixed-margin');
} else if (isTableHeaderInView) {
header?.classList.remove('ag-header-fixed');
header?.classList.remove('ag-header-fixed', 'ag-header-window-bar');
root?.classList.remove('ag-header-fixed-margin');
}
}, [enabled, isTableHeaderInView, isTableInView, windowBarStyle]);