修复表格滚动高度

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

View File

@ -677,8 +677,7 @@ const Crontab = ({ headerStyle, isPhone }: any) => {
setTimeout(() => {
if (selectedRowIds.length === 0 || selectedIds.length === 0) {
const offset = isPhone ? 40 : 0;
setTableScrollHeight(getTableScroll() - offset);
setTableScrollHeight(getTableScroll());
}
});
};
@ -762,9 +761,8 @@ const Crontab = ({ headerStyle, isPhone }: any) => {
useEffect(() => {
setPageSize(parseInt(localStorage.getItem('pageSize') || '20'));
const offset = isPhone ? 40 : 0;
setTimeout(() => {
setTableScrollHeight(getTableScroll() - offset);
setTableScrollHeight(getTableScroll());
});
}, []);

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 }));
});
}, []);

View File

@ -367,8 +367,7 @@ const Env = ({ headerStyle, isPhone, theme }: any) => {
setTimeout(() => {
if (selectedRowIds.length === 0 || selectedIds.length === 0) {
const offset = isPhone ? 40 : 0;
setTableScrollHeight(getTableScroll({ extraHeight: 87 }) - offset);
setTableScrollHeight(getTableScroll({ extraHeight: 87 }));
}
});
};
@ -437,9 +436,8 @@ const Env = ({ headerStyle, isPhone, theme }: any) => {
}, [searchText]);
useEffect(() => {
const offset = isPhone ? 40 : 0;
setTimeout(() => {
setTableScrollHeight(getTableScroll({ extraHeight: 87 }) - offset);
setTableScrollHeight(getTableScroll({ extraHeight: 87 }));
});
}, []);