修复表格滚动高度

This commit is contained in:
whyour
2021-10-31 19:45:51 +08:00
parent 021d89379a
commit b92daedea2
3 changed files with 6 additions and 12 deletions
+2 -4
View File
@@ -244,8 +244,7 @@ const Dependence = ({ headerStyle, isPhone, socketMessage }: any) => {
setTimeout(() => {
if (selectedRowIds.length === 0 || selectedIds.length === 0) {
const offset = isPhone ? 40 : 0;
setTableScrollHeight(getTableScroll({ extraHeight: 87 }) - offset);
setTableScrollHeight(getTableScroll({ extraHeight: 87 }));
}
});
};
@@ -301,9 +300,8 @@ const Dependence = ({ headerStyle, isPhone, socketMessage }: any) => {
}, [searchText, type]);
useEffect(() => {
const offset = isPhone ? 40 : 0;
setTimeout(() => {
setTableScrollHeight(getTableScroll({ extraHeight: 87 }) - offset);
setTableScrollHeight(getTableScroll({ extraHeight: 87 }));
});
}, []);