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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user