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;
|
return;
|
||||||
}
|
}
|
||||||
form.setFieldValue('cluster_id', next);
|
form.setFieldValue('cluster_id', next);
|
||||||
handleClusterChange?.(next as number);
|
handleClusterChange?.(next);
|
||||||
}, [scopeOrgId, clusterOptions, form, handleClusterChange]);
|
}, [clusterOptions, form, handleClusterChange]);
|
||||||
|
|
||||||
const clusterOptionRender = (option: any) => {
|
const clusterOptionRender = (option: any) => {
|
||||||
const { data } = option;
|
const { data } = option;
|
||||||
|
|||||||
Reference in New Issue
Block a user