Skip to content

Commit 91d636d

Browse files
authored
fix selection clearing (opendatahub-io#5239)
1 parent c4876bf commit 91d636d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/model-serving/src/components/deploymentWizard/fields/modelLocationFields/ExistingConnectionField.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,11 @@ export const ExistingConnectionField: React.FC<ExistingConnectionFieldProps> = (
9090
toggleWidth="450px"
9191
selectOptions={options}
9292
onSelect={(_, value) => {
93-
if (modelLocationData) {
93+
if (
94+
modelLocationData &&
95+
(!selectedConnection ||
96+
getResourceNameFromK8sResource(selectedConnection) !== value)
97+
) {
9498
resetModelLocationData();
9599
}
96100

0 commit comments

Comments
 (0)