If you add an event handler directly on a material comp, it will not fire.
If you wrap the material comp in a DOM element, the events on the element fire.
<div @click="hitme"><md-button>THIS HANDER FIRES</md-button></div>
<md-button @click="hitme">THIS HANDER NEVER FIRES</md-button>
Vue.use(VueMaterial)
var App = new Vue({
el: '#app',
methods:{
hitme:function(){
console.log("hit me called")
}
}
})
all
click handlers work
click handlers directly on Vue Material components do not work.
You need use native handlers on every vue component @click.native="hitme"
Thanks!
You need use native handlers on every vue component @click.native="hitme"
here it is, buried in the Vue docs: https://vuejs.org/v2/guide/components.html#Binding-Native-Events-to-Components
Most helpful comment
You need use native handlers on every vue component
@click.native="hitme"