yansern / vue-multipane

Resizable split panes for Vue.js.
https://yansern.github.io/vue-multipane/
Other
595 stars 126 forks source link

event handler case warnings on paneresize #8

Open vertcitron opened 6 years ago

vertcitron commented 6 years ago

Hello and thank you for this cool component.

I saw in doc that the resize event is "paneresize".

But when I use it like this : <multipane id="general-panel" layout="vertical" @paneresize="resized"> the callback method is not fired and I get this warning in browser's console : vue.esm.js?efeb:580 [Vue tip]: Event "paneresize" is emitted in component <Multipane> but the handler is registered for "paneResize". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "pane-resize" instead of "paneResize".

If I change to @paneResize="resized", the callback is now fired and works but the warning still appears.

If I change to @pane-resize="resized", the callback is not fired and the warning still appears.

So only the second solution works, (with paneResize) but I don't like to use camelCase with HTML attributes, and the warning remains.

Am I wrong with the way I catch the event ? Is there any solution ?

Thank you for your time, best regards.

meh2481 commented 6 years ago

You are correct; the events are emitted incorrectly. See issue #1

vertcitron commented 6 years ago

Ok thx very much. Let us know when 0.9.6 will be merged...

Worie commented 5 years ago

Any plans on merging?