fix: model list not refresh

This commit is contained in:
jialin
2024-07-12 16:17:47 +08:00
parent d839464a05
commit 0a0b96735c
13 changed files with 63 additions and 35 deletions
+2 -4
View File
@@ -1,6 +1,6 @@
import { GPUStackVersionAtom } from '@/atoms/user';
import { getAtomStorage } from '@/atoms/utils';
import VersionInfo from '@/components/version-info';
import VersionInfo, { modalConfig } from '@/components/version-info';
import externalLinks from '@/config/external-links';
import { useIntl } from '@umijs/max';
import { Button, Modal, Space } from 'antd';
@@ -11,9 +11,7 @@ const Footer: React.FC = () => {
const showVersion = () => {
Modal.info({
icon: null,
centered: false,
width: 500,
...modalConfig,
content: <VersionInfo intl={intl} />
});
};
@@ -36,8 +36,9 @@ const TableRow: React.FC<
const pollTimer = useRef<any>(null);
const chunkRequestRef = useRef<any>(null);
const childrenDataRef = useRef<any[]>([]);
childrenDataRef.current = childrenData;
console.log('table row====');
console.log('table row====', record.name, firstLoad, expanded);
const { updateChunkedList } = useUpdateChunkedList({
setDataList: setChildrenData
// callback: (list) => renderChildren?.(list)
@@ -54,10 +55,6 @@ const TableRow: React.FC<
}
}, [rowSelection]);
useEffect(() => {
childrenDataRef.current = childrenData;
}, [childrenData]);
// useEffect(() => {
// if (expandedRowKeys?.includes(record[rowKey])) {
// setExpanded(true);
+4 -1
View File
@@ -69,7 +69,10 @@ const StatusTag: React.FC<StatusTagProps> = ({
}}
>
{statusValue.message ? (
<Tooltip title={statusValue.message}>
<Tooltip
title={statusValue.message}
overlayInnerStyle={{ maxHeight: 200, overflow: 'auto' }}
>
<span className="m-r-5">
<InfoCircleOutlined />
</span>
+1
View File
@@ -6,6 +6,7 @@
.img {
margin-top: 16px;
margin-bottom: 30px;
text-align: center;
height: 30px;
+8 -3
View File
@@ -13,9 +13,6 @@ const VersionInfo: React.FC<{ intl: any }> = ({ intl }) => {
<div className="img">
<img src={Logo} alt="logo" />
</div>
<div className="title">
{intl.formatMessage({ id: 'common.footer.version.title' })}
</div>
<div>
<div className="ver">
<span className="label">
@@ -36,4 +33,12 @@ const VersionInfo: React.FC<{ intl: any }> = ({ intl }) => {
);
};
export const modalConfig = {
icon: null,
centered: false,
maskClosable: true,
footer: null,
width: 400
};
export default VersionInfo;