diff --git a/frontend/components/global/Select.vue b/frontend/components/global/Select.vue index f66f7a3..0b62161 100644 --- a/frontend/components/global/Select.vue +++ b/frontend/components/global/Select.vue @@ -13,7 +13,9 @@ type Emit = { // props -defineProps(); +const props = defineProps(); + +const { modelValue } = toRefs(props); // emit @@ -21,16 +23,12 @@ const emit = defineEmits(); // state -const selectedValue = ref(); +const selectedValue = computed({ + get: () => modelValue.value, + set: (value: string) => emit("update:modelValue", value), +}); // watch - -watch( - () => selectedValue.value, - (newValue) => { - emit("update:modelValue", newValue); - } -);