I am looking to toggle the visibility of a new div when any of the user links is clicked:
<ul id="pm-tabs">
<li v-for="user in unreadMsgsList">
<a @click="openPMbox(user)"> ${user}</a>
</li>
</ul>
The method I'm using is:
openPMbox: function(user) {
this.isPmBoxOpenList[user] = !this.isPmBoxOpenList[user];
},
The user data is stored in isPmBoxOpenList: []
and it has been confirmed that it is populated correctly.
The window that should show/hide looks like this and is separate from the above v-for
loop:
<div class="pmbox" v-bind:disabled=="isPmBoxOpenList" >Some Text </div>
However, I am encountering an error in the template. I am unsure how to properly define pmbox
, so any guidance on this would be appreciated.
P.S. It is worth noting that user
is not defined in data
. It is simply an object within the isPmBoxOpenList
array.