Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
da8c7b281e
|
@ -15,8 +15,7 @@
|
||||||
</template>
|
</template>
|
||||||
<o-taginput
|
<o-taginput
|
||||||
:modelValue="tagsStrings"
|
:modelValue="tagsStrings"
|
||||||
@remove="remove"
|
@update:modelValue="updateTags"
|
||||||
@add="add"
|
|
||||||
:data="filteredTags"
|
:data="filteredTags"
|
||||||
:allow-autocomplete="true"
|
:allow-autocomplete="true"
|
||||||
:allow-new="true"
|
:allow-new="true"
|
||||||
|
@ -94,17 +93,6 @@ const filteredTags = computed((): ITag[] => {
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
// TODO It seems that '@update:modelValue="updateTags"' does not works anymore...
|
|
||||||
// so temporarily call the function updateTags() at remove and add tag event
|
|
||||||
// https://github.com/oruga-ui/oruga/issues/967
|
|
||||||
function remove() {
|
|
||||||
updateTags(tagsStrings.value);
|
|
||||||
}
|
|
||||||
|
|
||||||
function add() {
|
|
||||||
updateTags(tagsStrings.value);
|
|
||||||
}
|
|
||||||
|
|
||||||
const updateTags = (newTagsStrings: string[]) => {
|
const updateTags = (newTagsStrings: string[]) => {
|
||||||
const tagEntities = newTagsStrings.map((tag: string | ITag) => {
|
const tagEntities = newTagsStrings.map((tag: string | ITag) => {
|
||||||
if (typeof tag !== "string") {
|
if (typeof tag !== "string") {
|
||||||
|
|
Loading…
Reference in a new issue