framework7io / framework7-vue

Deprecated! Build full featured iOS & Android apps using Framework7 & Vue
http://framework7.io/vue/
MIT License
674 stars 151 forks source link

set toggle checked #368

Closed mohamedsalehamin closed 6 years ago

mohamedsalehamin commented 6 years ago

i want to set the toggle value is checked programmatically

i tried to do this.$f7.toggle.get('toggle');

but i get undefined

nolimits4web commented 6 years ago

.get(‘.toggle’)

mohamedsalehamin commented 6 years ago

sorry it was a typo
thats what i did already console.log(this.$f7.toggle.get('.toggle'))

kevinqqnj commented 6 years ago

use Vue bind "checked" value with one variable.

<f7-toggle :checked="manual_active" @change="manual_active = $event.target.checked" />