marionettejs / backbone.radio

Messaging patterns for Backbone applications.
MIT License
490 stars 50 forks source link

Unbind a "trigger" event #266

Closed btburton42 closed 8 years ago

btburton42 commented 8 years ago

Hi there, we have a situation where a component is being destroyed and reinvoked during the lifecycle of a page. I've set a trigger event on that component and I'd like a way to unbind that event so that when the component is reinvoked it will only have a single trigger attached to it.

I've combed through the issues and the source and can't find anything outside of reset which seems overly destructive. Am I reading the source correctly, and there is no way to unbind a trigger function without doing a reset?

Many thanks for the support.

btburton42 commented 8 years ago

NVM, this dev had placed the trigger in the collection. When I moved it to the view, I was able to call this.unbind() and remove the trigger easily.