Skip to content

Commit bc67301

Browse files
committed
fix(projects): fixed tables not showing scrollbars when screen width changes . close #5
1 parent a4ea4c4 commit bc67301

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/hooks/common/table.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,10 +205,10 @@ export function useTableOperate<T extends TableData = TableData>(
205205
export function useTableScroll(scrollX: number = 702) {
206206
const tableWrapperRef = useRef<HTMLDivElement>(null);
207207

208-
const height = tableWrapperRef.current?.clientHeight;
208+
const size = useSize(tableWrapperRef);
209209

210210
const scrollConfig = {
211-
y: height ? height - 176 : 240,
211+
y: size?.height ? size.height - 184 : 240,
212212
x: scrollX
213213
};
214214

0 commit comments

Comments
 (0)