1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-22 03:47:09 +00:00

fix: metadata arrow action (#6300)

Co-authored-by: 杨国璇 <ygx@Hello-word.local>
This commit is contained in:
杨国璇
2024-07-05 13:59:06 +08:00
committed by GitHub
parent e19c4c1eac
commit 182b0f278f
12 changed files with 51 additions and 63 deletions

View File

@@ -147,12 +147,8 @@ const Container = () => {
return recordGetter(recordIndex);
}, [groupRecordGetter, recordGetter]);
const getTableContentWidth = useCallback(() => {
return containerRef?.current?.offsetWidth || 0;
}, [containerRef]);
const getTableContentLeft = useCallback(() => {
return containerRef?.current?.getBoundingClientRect()?.left || 0;
const getTableContentRect = useCallback(() => {
return containerRef?.current?.getBoundingClientRect() || { x: 0, right: window.innerWidth };
}, [containerRef]);
useEffect(() => {
@@ -182,8 +178,7 @@ const Container = () => {
modifyRecords={modifyRecords}
recordGetterById={recordGetterById}
recordGetterByIndex={recordGetterByIndex}
getTableContentWidth={getTableContentWidth}
getTableContentLeft={getTableContentLeft}
getTableContentRect={getTableContentRect}
getAdjacentRowsIds={getAdjacentRowsIds}
loadAll={loadAll}
/>