Merge pull request #403 from widgetic/fix/binding-input-radio-group

Fix: binding input radio group #399
pull/407/head
Rich Harris 9 years ago committed by GitHub
commit 5d697eca65

@ -59,9 +59,7 @@ export default function createBinding ( generator, node, attribute, current, loc
setter = deindent`
if ( !${local.name}.checked ) return;
${setter}
component._bindingGroups[${bindingGroup}].forEach( function ( input ) {
input.checked = false;
});`;
`;
}
const condition = type === 'checkbox' ?

@ -54,6 +54,10 @@ export default {
<p>Alpha</p>
` );
assert.equal( inputs[0].checked, true );
assert.equal( inputs[1].checked, false );
assert.equal( inputs[2].checked, false );
component.set({ selected: values[2] });
assert.equal( inputs[0].checked, false );
assert.equal( inputs[1].checked, false );

Loading…
Cancel
Save