0
0
Fork 0

nullishToTrue fn

This commit is contained in:
Alex Moreno 2024-08-01 09:47:38 +02:00
parent 5233c1455a
commit d9fb0d9186
1 changed files with 9 additions and 5 deletions

View File

@ -183,6 +183,10 @@ async function filterHandler(val, update) {
}
);
}
function nullishToTrue(value) {
return value ?? true;
}
</script>
<template>
@ -202,11 +206,11 @@ async function filterHandler(val, update) {
:option-value="optionValue"
v-bind="$attrs"
@filter="filterHandler"
:emit-value="$attrs['emit-value'] ?? true"
:map-options="$attrs['map-options'] ?? true"
:use-input="$attrs['use-input'] ?? true"
:hide-selected="$attrs['hide-selected'] ?? true"
:fill-input="$attrs['fill-input'] ?? true"
:emit-value="nullishToTrue($attrs['emit-value'])"
:map-options="nullishToTrue($attrs['map-options'])"
:use-input="nullishToTrue($attrs['use-input'])"
:hide-selected="nullishToTrue($attrs['hide-selected'])"
:fill-input="nullishToTrue($attrs['fill-input'])"
ref="vnSelectRef"
lazy-rules
:class="{ required: $attrs.required }"