fix: model be cleared when apply config to all in compare

This commit is contained in:
jialin
2024-11-22 18:25:07 +08:00
parent c8c22b3f22
commit a6f0f554f0
14 changed files with 124 additions and 102 deletions
@@ -24,10 +24,11 @@ interface LogsViewerProps {
params?: object;
ref?: any;
tail?: number;
enableScorllLoad?: boolean;
diffHeight?: number;
}
const LogsViewer: React.FC<LogsViewerProps> = forwardRef((props, ref) => {
const { diffHeight, url, tail: defaultTail } = props;
const { diffHeight, url, tail: defaultTail, enableScorllLoad = true } = props;
const { pageSize, page, setPage, setTotalPage, totalPage } =
useLogsPagination();
const { setChunkFetch } = useSetChunkFetch();
@@ -169,7 +170,7 @@ const LogsViewer: React.FC<LogsViewerProps> = forwardRef((props, ref) => {
const handleOnScroll = useCallback(
async (isTop: boolean) => {
setIsAtTop(isTop);
if (loading || isLoadend || logs.length < pageSize) {
if (loading || isLoadend || logs.length < pageSize || !enableScorllLoad) {
return;
}
if (isTop && !isLoadend) {