Skip to content

Commit

Permalink
fix(projects): fixed tables not showing scrollbars when screen width …
Browse files Browse the repository at this point in the history
…changes . close #5
  • Loading branch information
mufeng889 committed Aug 21, 2024
1 parent a4ea4c4 commit bc67301
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/hooks/common/table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,10 +205,10 @@ export function useTableOperate<T extends TableData = TableData>(
export function useTableScroll(scrollX: number = 702) {
const tableWrapperRef = useRef<HTMLDivElement>(null);

const height = tableWrapperRef.current?.clientHeight;
const size = useSize(tableWrapperRef);

const scrollConfig = {
y: height ? height - 176 : 240,
y: size?.height ? size.height - 184 : 240,
x: scrollX
};

Expand Down

0 comments on commit bc67301

Please sign in to comment.