8000 BAccordionItem: Initial v-model value is not considered · Issue #2657 · bootstrap-vue-next/bootstrap-vue-next · GitHub
[go: up one dir, main page]

Skip to content
BAccordionItem: Initial v-model value is not considered #2657
Closed
@bettysteger

Description

@bettysteger

Describe the bug

It worked with a previous version of bootstrap-vue-next, but not with 0.28.5.

i am having this code:

<script setup>
const visibleAccordions = reactive({ first: true, second: false, third: false });
</script>
<template>
  <BAccordion>
    <BAccordionItem v-model="visibleAccordions.first"></BAccordionItem>
    <BAccordionItem v-model="visibleAccordions.second"></BAccordionItem>
    <BAccordionItem v-model="visibleAccordions.third"></BAccordionItem>
  </BAccordion>
</template>

where the 1st accordion item should be openend automatically. After the upgrade i now have to do this:

onMounted(() => {
  setTimeout(() => {
    visibleAccordions.first = true;
  });
});

Reproduction

https://stackblitz.com/edit/bootstra-vue-next-template-hwqzfwxu?file=src%2Fcomponents%2FComp.vue

Used Package Manager

yarn

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

      0