mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-07 04:20:12 +02:00
fix position of sticky table header when titlebar present
This commit is contained in:
@@ -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]);
|
||||
|
||||
@@ -10,6 +10,10 @@
|
||||
transition: position 0.2s ease-in-out;
|
||||
}
|
||||
|
||||
.ag-header-window-bar {
|
||||
top: 95px;
|
||||
}
|
||||
|
||||
.ag-header {
|
||||
z-index: 5;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user