Prace s mapu, zobrazeni GPX, editace kopilota, skeletony
This commit is contained in:
@@ -10,6 +10,11 @@ const props = defineProps({
|
||||
required: false,
|
||||
default: () => []
|
||||
},
|
||||
enableNewValues: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: true,
|
||||
},
|
||||
options: {
|
||||
type: Array,
|
||||
required: true,
|
||||
@@ -17,9 +22,9 @@ const props = defineProps({
|
||||
})
|
||||
|
||||
const model = ref({});
|
||||
onMounted(() => {
|
||||
model.value = props.modelValue;
|
||||
})
|
||||
watch(() => props.modelValue, (newVal) => {
|
||||
model.value = newVal;
|
||||
}, {immediate: true});
|
||||
|
||||
const emit = defineEmits(['update:modelValue', 'clear']);
|
||||
watch(model, (val) => {
|
||||
@@ -84,7 +89,7 @@ const filterFn = (val, update, abort) => {
|
||||
:options="availableOptions"
|
||||
option-label="name"
|
||||
option-value="id"
|
||||
new-value-mode="add"
|
||||
:new-value-mode="enableNewValues ? 'add' : 'toggle'"
|
||||
clear-icon="clear"
|
||||
:v-bind="$attrs"
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user