Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/binders.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ Rivets.public.binders.value =

bind: (el) ->
unless el.tagName is 'INPUT' and el.type is 'radio'
@event = if el.tagName is 'SELECT' then 'change' else 'input'
@event = if el.tagName is 'SELECT' then 'change' else Rivets.public.updateEvent
Rivets.Util.bindEvent el, @event, @publish

unbind: (el) ->
Expand Down
4 changes: 4 additions & 0 deletions src/rivets.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Rivets =
'rootInterface'
'preloadData'
'handler'
'updateEvent'
]

extensions: [
Expand Down Expand Up @@ -41,6 +42,9 @@ Rivets =
# Preload data by default.
preloadData: true

# Use the 'oninput' event by default so synchronization occurs as changes occur.
updateEvent: 'input'

# Default event handler.
handler: (context, ev, binding) ->
@call context, ev, binding.view.models
Expand Down