mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 08:55:33 +00:00
fix: table height shrinking with large data set at full height (#4787)
This commit is contained in:
parent
73d510511d
commit
6609870aed
@ -165,7 +165,6 @@ export const useBlockHeight = () => {
|
||||
return height;
|
||||
};
|
||||
export const useTableSize = () => {
|
||||
const [height, setTableHeight] = useState<number>();
|
||||
const [width, setTableWidth] = useState<number>();
|
||||
const elementRef = useRef<HTMLDivElement>(null);
|
||||
const targetHeight = useTableHeight();
|
||||
@ -176,7 +175,6 @@ export const useTableSize = () => {
|
||||
const tableContentRect = elementRef.current.querySelector('.ant-table')?.getBoundingClientRect();
|
||||
if (!tableContentRect) return;
|
||||
setTableWidth(clientRect.width);
|
||||
setTableHeight(targetHeight);
|
||||
}, 100),
|
||||
[targetHeight],
|
||||
);
|
||||
@ -190,8 +188,7 @@ export const useTableSize = () => {
|
||||
);
|
||||
|
||||
useEventListener('resize', calcTableSize);
|
||||
|
||||
return { height, width, tableSizeRefCallback };
|
||||
return { height: targetHeight, width, tableSizeRefCallback };
|
||||
};
|
||||
|
||||
const hasActionContainerInParentChain = (schema) => {
|
||||
|
Loading…
Reference in New Issue
Block a user