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 }}"
- [Vuejs]-Critical dependency: the request of a dependency is an expression, when using v-bind
- [Vuejs]-Average Sub-Array Data from JSON
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.
Source:stackexchange.com