refactor: refs #7679 better way to update model #581

Merged
alexm merged 2 commits from 7679-vnLocation_improve into master 2024-08-01 08:06:20 +00:00
1 changed files with 9 additions and 5 deletions
Showing only changes of commit d9fb0d9186 - Show all commits

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 }"