fix: model be cleared when apply config to all in compare
This commit is contained in:
@@ -11,8 +11,8 @@ const options: any = {
|
||||
...grid,
|
||||
right: -1,
|
||||
top: -1,
|
||||
bottom: -1,
|
||||
left: -1,
|
||||
bottom: 2,
|
||||
left: 2,
|
||||
containLabel: true,
|
||||
borderRadius: 4
|
||||
},
|
||||
|
||||
@@ -13,7 +13,7 @@ interface LogsPaginationProps {
|
||||
}
|
||||
|
||||
const LogsPagination: React.FC<LogsPaginationProps> = (props) => {
|
||||
const { page, total, pageSize, onWheel, onNext, onPrev } = props;
|
||||
const { page, total, pageSize, onNext, onPrev } = props;
|
||||
const intl = useIntl();
|
||||
|
||||
const handleOnPrev = () => {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -199,14 +199,12 @@ const MarkdownViewer: React.FC<MarkdownViewerProps> = ({
|
||||
|
||||
return (
|
||||
<>
|
||||
(
|
||||
<div
|
||||
style={{ height }}
|
||||
className="markdown-viewer custom-scrollbar-horizontal"
|
||||
>
|
||||
{renderTokens(tokens)}
|
||||
</div>
|
||||
)
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user