Closed donalmurtagh closed 7 years ago
@donalmurtagh Angular doesn't like two radio with the same values.
The following will show the same issue and is pure angular code without our framework:
<input type="radio" name="fred" ng-model="fred" ng-value="true">
<input type="radio" name="fred" ng-model="fred" ng-value="false">
<input type="radio" name="fred" ng-model="fred" ng-value="false">
If you do the same thing in the latest 1.x version it selects both, so I am not sure when they fixed it but you could try ngJS 1.4 or 1.5 and see if that helps.
I don't agree that selecting both should be considered a fix, but if the behaviour with ASF is the same as in a pure angular form, then I think it's reasonable to close this issue.
In this plunker demo I've defined a form with a property of type boolean. The property is displayed using a group of radio buttons, the first of which sets the property to
true
and the other two set it tofalse
.However, if I change the property to a false value by selecting either option 2 or 3, the button that is shown as selected is always the other false button
Steps to Reproduce
Option 3 will be shown as selected. Similarly, if you choose Option 3, Option 2 will be shown as selected.
In a regular HTML form, this problem does not occur, i.e. if you have multiple radio button with the same value, the one you click on will be show as selected.
@json-schema-form/angular-schema-form-lead