njvan
1
Hi all,
I’m trying to add {{testVenue.key}} to an action button, however it’s not updating as expected.
{{testVenue.key}} <= correct value here
<a href="#" v-if="editor" data-actions="#actions-venue" class="actions-open">
<f7-actions id="actions-venue">
<f7-actions-group>
<f7-actions-button>{{testVenue.key}}</f7-actions-button> <= always 0
<f7-actions-button v-on:click="deleteVenue(testVenue.key)">Delete</f7-actions-button> <= always passes 0 to the method```
Try this deleteVenue('{{testVenue.key}}')
njvan
3
@martinarlando, thanks Martin, however that just turns {{testVenue.key}} into a string
njvan
5
It’s an array of venues. I want to pass the index to be able to remove it from the array. It’s user-defined, so of unknown length.
njvan
6
It’s also something localised to f7-actions, if I put v-on:click=“deleteVenue(testVenue.key)” on the icon, it works as expected.
In my knowledge, we should use each
to loop array on HTML. You can find it on Template7
njvan
8
Hi Martin,
This is inside of the loop. Which is why it’s unexpected that the value is correct above the actions group but fixed inside it.