forked from potsda.mn/mobilizon
fix(front): preserve tags when modifiying post or event
closes #1307 closes #1289
This commit is contained in:
parent
2078dbcf55
commit
df6ffee7cf
|
@ -15,8 +15,7 @@
|
|||
</template>
|
||||
<o-taginput
|
||||
:modelValue="tagsStrings"
|
||||
@remove="remove"
|
||||
@add="add"
|
||||
@update:modelValue="updateTags"
|
||||
:data="filteredTags"
|
||||
:allow-autocomplete="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 tagEntities = newTagsStrings.map((tag: string | ITag) => {
|
||||
if (typeof tag !== "string") {
|
||||
|
|
Loading…
Reference in a new issue