Skip to content

Commit bfe0ca7

Browse files
committed
radio button picker fix for #105
1 parent 86d776b commit bfe0ca7

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

source/nuPickers/Shared/RadioButtonPicker/RadioButtonPickerEditor.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@
99
ng-name="radioButtonPicker"
1010
value="{{option.key}}"
1111
ng-model="$parent.pickedKey"
12-
ng-checked="option.key == $parent.pickedKey"
13-
ng-change="radioButtonChange()" />
12+
ng-checked="option.key == $parent.pickedKey" />
1413

1514
<span ng-bind-html-unsafe="option.label"></span>
1615
</label>

source/nuPickers/Shared/RadioButtonPicker/RadioButtonPickerEditorController.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@ angular
1111
$scope.pickedKey = pickedKeys[0];
1212
});
1313

14-
$scope.radioButtonChange = function () {
15-
$scope.model.value = editorResource.createSaveValue($scope.model.config, [$scope.getPickedOption()]);
16-
};
17-
1814
// get picked option by copying a matching one by key from the source
1915
$scope.getPickedOption = function () {
2016

@@ -36,4 +32,8 @@ angular
3632

3733
});
3834

35+
$scope.$on("formSubmitting", function () {
36+
$scope.model.value = editorResource.createSaveValue($scope.model.config, [$scope.getPickedOption()]);
37+
});
38+
3939
}]);

0 commit comments

Comments
 (0)