diff --git a/src/client/vite/src/components/Forms/Field/List.vue b/src/client/vite/src/components/Forms/Field/List.vue index e010ca98c..1caca1c2b 100644 --- a/src/client/vite/src/components/Forms/Field/List.vue +++ b/src/client/vite/src/components/Forms/Field/List.vue @@ -145,7 +145,7 @@ const props = defineProps({ const inp = reactive({ isOpen: false, id: "", - value: props.value, + value: props.value.trim(), values: computed(() => { return inp.value.split(props.separator); }), @@ -162,8 +162,8 @@ const inp = reactive({ // Check if enter value is already a value isEnterMatching: computed(() => { if (!inp.enterValue) return false; - if (!props.value.split(props.separator)) return false; - return props.value + if (!inp.value.split(props.separator)) return false; + return inp.value .split(props.separator) .some((str) => str.toLowerCase() === inp.enterValue.toLowerCase()); }), @@ -353,7 +353,6 @@ const emits = defineEmits(["inp"]); :hideLabel="props.hideLabel" :headerClass="props.headerClass" /> -
diff --git a/src/client/vite/src/pages/test/Test.vue b/src/client/vite/src/pages/test/Test.vue index 16d1b1131..614b60ab3 100644 --- a/src/client/vite/src/pages/test/Test.vue +++ b/src/client/vite/src/pages/test/Test.vue @@ -7,7 +7,7 @@ import DashboardLayout from "@components/Dashboard/Layout.vue"; const list = { id: "test-input", - value: "yes no maybe I don't know can you repeat the question", + value: "yes no maybe I don't know can you repeat the question ", name: "test-list", label: "Test list", inpType: "list",