aarondfrancis / vue-model

Model component for Vue.js
MIT License
857 stars 42 forks source link

Listeners are not vue instance specific #19

Open aarondfrancis opened 6 years ago

aarondfrancis commented 6 years ago

In the situation where there are multiple, identical components on the page each registering event listeners, the listeners are not instance specific.

For example, if there is a list of comment components and each component has a model listener for comment.update.success then whenever any model fires that event, every component hears it. This may be desired behavior in some cases, but not in others.

I think the default should be instance-specific, and global listeners should be added differently.

Thoughts?