fix: do not get the backend when local path blur

This commit is contained in:
jialin
2025-03-12 17:41:38 +08:00
parent a7170a4eee
commit fc0899d9d3
5 changed files with 38 additions and 25 deletions
@@ -95,8 +95,7 @@ const UpdateModal: React.FC<AddModalProps> = (props) => {
}
};
const updateShowWarning = () => {
const backend = form.getFieldValue?.('backend');
const updateShowWarning = (backend: string) => {
const localPath = form.getFieldValue?.('local_path');
if (formData?.source !== modelSourceMap.local_path_value || !localPath) {
@@ -133,7 +132,7 @@ const UpdateModal: React.FC<AddModalProps> = (props) => {
}
form.setFieldValue('backend_version', '');
handleSetGPUIds(val);
updateShowWarning();
updateShowWarning(backend);
};
const handleOnFocus = () => {