From d4839f5c3bb471faf9050cc99629df07fc196e48 Mon Sep 17 00:00:00 2001 From: Simon Bernard Date: Thu, 24 Feb 2022 16:19:05 +0100 Subject: [PATCH] bsserver-demo: Fix Bootstrap Config dialog issue. Invalid button state : sometime add/next is not disabled when it should be. --- .../src/components/wizard/ClientConfigDialog.vue | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/leshan-bsserver-demo/webapp/src/components/wizard/ClientConfigDialog.vue b/leshan-bsserver-demo/webapp/src/components/wizard/ClientConfigDialog.vue index 18a0e503c4..e641b222e0 100644 --- a/leshan-bsserver-demo/webapp/src/components/wizard/ClientConfigDialog.vue +++ b/leshan-bsserver-demo/webapp/src/components/wizard/ClientConfigDialog.vue @@ -126,12 +126,18 @@ import { toHex, base64ToBytes } from "@leshan-server-core-demo/js/byteutils.js"; import EndpointStep from "./EndpointStep.vue"; import SecurityStep from "./SecurityStep.vue"; -import DeleteStep from './DeleteStep.vue'; +import DeleteStep from "./DeleteStep.vue"; import ServerStep from "./ServerStep.vue"; import BootstrapServerStep from "./BootstrapServerStep.vue"; export default { - components: { EndpointStep, SecurityStep, ServerStep, BootstrapServerStep, DeleteStep }, + components: { + EndpointStep, + SecurityStep, + ServerStep, + BootstrapServerStep, + DeleteStep, + }, props: { value: Boolean /*open/close dialog*/ }, data() { return { @@ -190,11 +196,12 @@ export default { dm: { mode: "no_sec" }, bs: null, toDelete: ["/0", "/1"], - autoIdForSecurityObject:false + autoIdForSecurityObject: false, }; this.currentStep = 1; for (let i = 1; i <= this.nbSteps; i++) { - this.valid[i] = true; + // Not so clean but didn't find better way for now than initialize valid value manually + this.valid[i] = i == 1 ? false : true; if (this.$refs["step" + i]) this.$refs["step" + i].resetValidation(); } }