[pdm-devel] [PATCH datacenter-manager v3 21/23] ui: pve wizard: connect: reset later pages when form changes

Dominik Csapak d.csapak at proxmox.com
Thu Aug 21 10:39:42 CEST 2025


not only on connect. With this, we don't reset the later pages anymore
when we change between tabs without changing anything.

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 ui/src/remotes/wizard_page_connect.rs | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/ui/src/remotes/wizard_page_connect.rs b/ui/src/remotes/wizard_page_connect.rs
index d5d9708..6d48264 100644
--- a/ui/src/remotes/wizard_page_connect.rs
+++ b/ui/src/remotes/wizard_page_connect.rs
@@ -145,6 +145,11 @@ impl Component for PdmWizardPageConnect {
                     }
                 }
                 props.info.page_lock(!self.form_valid);
+                for page in ["nodes", "info"] {
+                    if let Some(form_ctx) = props.info.lookup_form_context(&Key::from(page)) {
+                        form_ctx.write().reset_form();
+                    }
+                }
             }
             Msg::Connect => {
                 let link = ctx.link().clone();
@@ -170,9 +175,6 @@ impl Component for PdmWizardPageConnect {
                     }
                 }
 
-                if let Some(form_ctx) = props.info.lookup_form_context(&Key::from("nodes")) {
-                    form_ctx.write().reset_form();
-                }
                 props.info.reset_remaining_valid_pages();
                 if self.connect_info.is_some() {
                     props.info.go_to_next_page();
-- 
2.47.2





More information about the pdm-devel mailing list