style: hidden expand button when no replicas

This commit is contained in:
jialin
2025-04-11 18:49:06 +08:00
parent b27ebaaccf
commit 7542ac9d87
12 changed files with 78 additions and 41 deletions
+6 -1
View File
@@ -389,6 +389,10 @@ const Models: React.FC = () => {
};
}, []);
const setDisableExpand = useCallback((record: any) => {
return !record?.replicas;
}, []);
useEffect(() => {
const handleVisibilityChange = async () => {
if (document.visibilityState === 'visible') {
@@ -419,7 +423,8 @@ const Models: React.FC = () => {
return (
<TableContext.Provider
value={{
allChildren: modelInstances
allChildren: modelInstances,
setDisableExpand: setDisableExpand
}}
>
<TableList