mirror of
https://github.com/bunkerity/bunkerweb
synced 2026-05-24 09:28:37 +00:00
fix conditions with separators
This commit is contained in:
parent
9510b94e7e
commit
865e66c382
2 changed files with 4 additions and 5 deletions
|
|
@ -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"
|
||||
/>
|
||||
|
||||
<!--custom-->
|
||||
<div class="relative">
|
||||
<div data-input-container class="input-regular-container">
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Reference in a new issue