Set input value for radio buttons as el.checked.
Showing
2 changed files
with
2 additions
and
1 deletions
... | @@ -17,7 +17,7 @@ registerBinding = (el, adapter, type, context, keypath) -> | ... | @@ -17,7 +17,7 @@ registerBinding = (el, adapter, type, context, keypath) -> |
17 | getInputValue = (el) -> | 17 | getInputValue = (el) -> |
18 | switch el.type | 18 | switch el.type |
19 | when 'text', 'textarea', 'password', 'select-one' then el.value | 19 | when 'text', 'textarea', 'password', 'select-one' then el.value |
20 | when 'checkbox' then el.checked | 20 | when 'checkbox', 'radio' then el.checked |
21 | 21 | ||
22 | attributeBinding = (attr) -> (el, value) -> | 22 | attributeBinding = (attr) -> (el, value) -> |
23 | if value then el.setAttribute attr, value else el.removeAttribute attr | 23 | if value then el.setAttribute attr, value else el.removeAttribute attr | ... | ... |
-
Please register or sign in to post a comment