From 207cef350f50d469b1f09c5ceb1f11c5332b7fbd Mon Sep 17 00:00:00 2001 From: gitlawr Date: Tue, 7 Jul 2026 16:32:26 +0800 Subject: [PATCH] refactor(models): drop redundant effect dep and cast Address review: scopeOrgId is already folded into clusterOptions (its useMemo dep), so the effect still fires on scope changes without listing it; and the next == null guard narrows next to number, so the cast goes. --- src/pages/llmodels/forms/basic.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/llmodels/forms/basic.tsx b/src/pages/llmodels/forms/basic.tsx index 110668c0..9e912e05 100644 --- a/src/pages/llmodels/forms/basic.tsx +++ b/src/pages/llmodels/forms/basic.tsx @@ -167,8 +167,8 @@ const BasicForm: React.FC = (props) => { return; } form.setFieldValue('cluster_id', next); - handleClusterChange?.(next as number); - }, [scopeOrgId, clusterOptions, form, handleClusterChange]); + handleClusterChange?.(next); + }, [clusterOptions, form, handleClusterChange]); const clusterOptionRender = (option: any) => { const { data } = option;