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>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -202,11 +206,11 @@ async function filterHandler(val, update) {
|
||||||
:option-value="optionValue"
|
:option-value="optionValue"
|
||||||
v-bind="$attrs"
|
v-bind="$attrs"
|
||||||
@filter="filterHandler"
|
@filter="filterHandler"
|
||||||
:emit-value="$attrs['emit-value'] ?? true"
|
:emit-value="nullishToTrue($attrs['emit-value'])"
|
||||||
:map-options="$attrs['map-options'] ?? true"
|
:map-options="nullishToTrue($attrs['map-options'])"
|
||||||
:use-input="$attrs['use-input'] ?? true"
|
:use-input="nullishToTrue($attrs['use-input'])"
|
||||||
:hide-selected="$attrs['hide-selected'] ?? true"
|
:hide-selected="nullishToTrue($attrs['hide-selected'])"
|
||||||
:fill-input="$attrs['fill-input'] ?? true"
|
:fill-input="nullishToTrue($attrs['fill-input'])"
|
||||||
ref="vnSelectRef"
|
ref="vnSelectRef"
|
||||||
lazy-rules
|
lazy-rules
|
||||||
:class="{ required: $attrs.required }"
|
:class="{ required: $attrs.required }"
|
||||||
|
|
Loading…
Reference in New Issue