forked from verdnatura/salix-front
nullishToTrue fn
This commit is contained in:
parent
5233c1455a
commit
d9fb0d9186
|
@ -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 }"
|
||||
|
|
Loading…
Reference in New Issue