mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-15 11:42:15 +01:00
use prop function createTag instead of event to make sure it is handled by the parent
This commit is contained in:
@@ -7,7 +7,6 @@ import type { Tag } from '@/utils/api';
|
||||
|
||||
const emit = defineEmits<{
|
||||
changed: [];
|
||||
createTag: [name: string, callback: (tag: Tag) => void];
|
||||
}>();
|
||||
|
||||
const model = defineModel({
|
||||
@@ -22,12 +21,13 @@ const iconColorClasses = computed(() => {
|
||||
});
|
||||
defineProps<{
|
||||
tags: Tag[];
|
||||
createTag: (name: string) => Promise<Tag | undefined>;
|
||||
}>();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<TagDropdown
|
||||
@createTag="(...args) => $emit('createTag', ...args)"
|
||||
:createTag
|
||||
@changed="emit('changed')"
|
||||
v-model="model"
|
||||
:tags="tags">
|
||||
|
||||
Reference in New Issue
Block a user