I am using Quasar’s QSlideIten (q-slide-item) and the @left & @right event.
<q-slide-item
v-for="(tournament, index) in tournamentsFiltered()"
:key="tournament.id"
clickable
v-ripple
left-color="blue-5"
right-color="red-5"
@left="editTournament"
@right="deleteTournament(tournament)"
bordered
:class="{ 'top-border' : index == 0,
'bottom-border' : index == tournamentsFiltered().length - 1 }"
>
In this example, the left event kicks off editTournament with no ().
const editTournament = ({reset}) => {
console.log('Edit tournament: ')
reset()
}
In my function, editTournaments I then have access to a method, reset() that is received from q-slide-item.
In my second function, deleteTournaments I need access to index or tournament details and sends tournament as an argument.
const deleteTournament = (tournament) => {
console.log('Delete tournament:', tournament)
// How do I access reset() -OR- is my approach wrong
}
The problem is when I call either of those functions with a trail () to the call, the reset() method is not available in my functions.
Can anyone guide me in the right direction?
Thank you.