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.
This commit is contained in:
gitlawr
2026-07-07 16:32:26 +08:00
parent fa3fed8671
commit 207cef350f
+2 -2
View File
@@ -167,8 +167,8 @@ const BasicForm: React.FC<BasicFormProps> = (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;