1

I am using Bootstrap-vue and targeted a b-modal with the <li> like this. But it opens the modals two times with one click

 <li>
     <a class="dropdown-item" v-b-modal.modal-2 >Modal</a>
  </li>

and Here is my modal

<b-modal id="modal-2" title="BootstrapVue">
    <p class="my-4">Hello from modal!</p>
  </b-modal>
Boussadjra Brahim
  • 82,684
  • 19
  • 144
  • 164
  • 1
    Do you have that `` component inside a `v-for`? Or perhaps just a modal with the same id two times? – Hiws Jan 02 '22 at 07:23
  • no its just a outside
      and
    • and this component don't have v-for , and the modal is declared just once
    – Aizaz Rehman Jan 02 '22 at 07:25
  • And you aren't using that component multiple times? – Hiws Jan 02 '22 at 12:18
  • Do you have any warning in your console? Something like this one https://stackoverflow.com/questions/47862591/vuejs-error-the-client-side-rendered-virtual-dom-tree-is-not-matching-server-re – Iman Shafiei Jan 02 '22 at 13:25
  • 1
    Fixed . Thank You Everyone. Actually the modal was in Header in component and the header component was used 2 times. that was the problem – Aizaz Rehman Jan 03 '22 at 02:33

0 Answers0