29a09067 by Michael Richards

Add support for using bypass binding declarations on iterated items.

1 parent dd452d26
...@@ -88,15 +88,16 @@ class Rivets.Binding ...@@ -88,15 +88,16 @@ class Rivets.Binding
88 88
89 # Unsubscribes from the model and the element. 89 # Unsubscribes from the model and the element.
90 unbind: => 90 unbind: =>
91 Rivets.config.adapter.unsubscribe @model, @keypath, @set 91 unless @options.bypass
92 Rivets.config.adapter.unsubscribe @model, @keypath, @set
92 93
93 if @options.dependencies?.length 94 if @options.dependencies?.length
94 for keypath in @options.dependencies 95 for keypath in @options.dependencies
95 callback = @dependencyCallbacks[keypath] 96 callback = @dependencyCallbacks[keypath]
96 Rivets.config.adapter.unsubscribe @model, keypath, callback 97 Rivets.config.adapter.unsubscribe @model, keypath, callback
97 98
98 if @type in @bidirectionals 99 if @type in @bidirectionals
99 @el.removeEventListener 'change', @publish 100 @el.removeEventListener 'change', @publish
100 101
101 # A collection of bindings built from a set of parent elements. 102 # A collection of bindings built from a set of parent elements.
102 class Rivets.View 103 class Rivets.View
......