Skip to content

Commit 5f4882d

Browse files
author
Lasim
committed
refactor: reset form data when navigating to previous steps in installation wizard
1 parent 415b243 commit 5f4882d

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

services/frontend/src/components/mcp-server/wizard/McpServerInstallWizard.vue

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,19 @@ const nextStep = () => {
157157
const previousStep = () => {
158158
if (canGoPrevious.value) {
159159
currentStep.value--
160+
161+
// Reset form data when going back to previous steps
162+
if (currentStep.value === 0) {
163+
// Going back to server selection - clear server data
164+
formData.value.server.server_id = ''
165+
formData.value.server.server_data = undefined
166+
formData.value.environment.user_environment_variables = {}
167+
environmentStepTouched.value = false
168+
} else if (currentStep.value === 1) {
169+
// Going back to environment step - clear platform data
170+
formData.value.platform.installation_type = 'local'
171+
formData.value.platform.platform_config = undefined
172+
}
160173
}
161174
}
162175

0 commit comments

Comments
 (0)