euvl/vue-js-toggle-button

Change event passing key and check state at the same time

Closed this issue · 1 comments

Hi Euvl,

First of all thanks for brilliant component ! Very nice look and feel and fully customized.
As for my question:
When you call @change="handler" I've got switch state that was set as true or false.
When you call :key="i" @change="handler(i)" I've got key of the switch in the v-for.

How to combine both to get switch state and key ?

Thanks!

OK, I resolved this by passing whole object to @change handler.