mirror of
https://github.com/antebudimir/feishin.git
synced 2025-12-31 18:13:31 +00:00
fix position of sticky table header when titlebar present
This commit is contained in:
parent
b265f2817b
commit
35ee7e4606
2 changed files with 6 additions and 2 deletions
|
|
@ -30,13 +30,13 @@ export const useFixedTableHeader = ({ enabled }: { enabled: boolean }) => {
|
||||||
const root = document.querySelector('main .ag-root');
|
const root = document.querySelector('main .ag-root');
|
||||||
|
|
||||||
if (!isTableHeaderInView && isTableInView) {
|
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');
|
root?.classList.add('ag-header-fixed-margin');
|
||||||
} else if (!isTableInView) {
|
} else if (!isTableInView) {
|
||||||
header?.classList.remove('ag-header-fixed');
|
header?.classList.remove('ag-header-fixed');
|
||||||
root?.classList.remove('ag-header-fixed-margin');
|
root?.classList.remove('ag-header-fixed-margin');
|
||||||
} else if (isTableHeaderInView) {
|
} 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');
|
root?.classList.remove('ag-header-fixed-margin');
|
||||||
}
|
}
|
||||||
}, [enabled, isTableHeaderInView, isTableInView, windowBarStyle]);
|
}, [enabled, isTableHeaderInView, isTableInView, windowBarStyle]);
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,10 @@
|
||||||
transition: position 0.2s ease-in-out;
|
transition: position 0.2s ease-in-out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.ag-header-window-bar {
|
||||||
|
top: 95px;
|
||||||
|
}
|
||||||
|
|
||||||
.ag-header {
|
.ag-header {
|
||||||
z-index: 5;
|
z-index: 5;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue