Skip to content

Form tags: when removing an added tag , it becomes selected #2938

@mariusa

Description

@mariusa

Describe the bug

https://bootstrap-vue-next.github.io/bootstrap-vue-next/docs/components/form-tags.html#custom-rendering-with-default-scoped-slot

The following is an example of using a custom select component for choosing from a pre-defined set of tags:

The example has a bug: when removing an added tag , it becomes selected

I tried to fix with AI and submit the fix, but testing gave the same bug :(

Reproduction

<template #default="{tags, inputAttrs, inputHandlers, tagVariant, addTag, removeTag}"> <BButton variant="primary" @click="addTag()" >Add
<BFormTag v-for="tag in tags" :key="tag" :title="tag" :variant="tagVariant" class="me-1" @remove="removeTag(tag)" >{{ tag }}
<script setup lang="ts"> import {ref} from 'vue' const value = ref<string[]>(['apple', 'orange', 'banana']) </script>

Used Package Manager

pnpm

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions