[Vuejs]-Multiple modal details in vue js

0👍

If you inspect each button trigger element what is the value in the data-target attribute? It’s probably the same for all of them, as you are not binding the id properly

Try with:

:data-target="'#exampleModal' + {{ item.id }}"

0👍

Set data-target in button tag as given below

:data-target="'#exampleModal' + item.id"

And modal id like this

:id="'exampleModal' + item.id"

And also add this CSS Style in your component

.fade:not(.show) {
   opacity: 1;
 }

And there is no need of showModal function.

Leave a comment