fix: update allChildren after stop or start

This commit is contained in:
jialin
2025-05-28 14:41:35 +08:00
parent 034a54bf4b
commit f53fe042a9
7 changed files with 10 additions and 24 deletions
+5 -1
View File
@@ -252,10 +252,14 @@ const Models: React.FC = () => {
});
}, [fetchData, createModelsChunkRequest, createModelsInstanceChunkRequest]);
const handleOnStop = useCallback((ids: number[]) => {
const handleOnStop = useCallback(async (ids: number[]) => {
cacheInsDataListRef.current = cacheInsDataListRef.current.filter(
(item: any) => !ids.includes(item.model_id)
);
await new Promise((resolve) => {
setTimeout(resolve, 300);
});
setModelInstances(cacheInsDataListRef.current);
}, []);
const handleSearch = useCallback(async () => {