We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent daeaaa4 commit 95d8564Copy full SHA for 95d8564
src/view/table/th.tsx
@@ -23,18 +23,16 @@ export function TH(
23
const { dispatch } = useStore();
24
25
useEffect(() => {
26
- setTimeout(() => {
27
- // sets the `top` style if the current TH is fixed
28
- if (config.fixedHeader && thRef.current) {
29
- const offsetTop = thRef.current.offsetTop;
+ // sets the `top` style if the current TH is fixed
+ if (config.fixedHeader && thRef.current) {
+ const offsetTop = thRef.current.offsetTop;
30
31
- if (typeof offsetTop === 'number') {
32
- setStyle({
33
- top: offsetTop,
34
- });
35
- }
+ if (typeof offsetTop === 'number') {
+ setStyle({
+ top: offsetTop,
+ });
36
}
37
- }, 0);
+ }
38
}, [thRef]);
39
40
const isSortable = (): boolean => props.column.sort != undefined;
0 commit comments