Skip to content

Commit efb82f0

Browse files
committed
refactor(radio-group): modify checked validity
1 parent 3bbb185 commit efb82f0

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

projects/igniteui-angular/src/lib/directives/radio/radio-group.directive.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ export class IgxRadioGroupDirective implements AfterContentInit, ControlValueAcc
435435
private _selectRadioButton() {
436436
if (this.radioButtons) {
437437
this.radioButtons.forEach((button) => {
438-
if (!this._value) {
438+
if (this._value === null) {
439439
// no value - uncheck all radio buttons
440440
if (button.checked) {
441441
button.checked = false;

projects/igniteui-angular/src/lib/radio/radio.component.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -366,10 +366,6 @@ export class IgxRadioComponent implements ControlValueAccessor, EditorProvider {
366366
public select() {
367367
this.nativeRadio.nativeElement.focus();
368368

369-
if (this.value === undefined || this.value === '' || this.value === null) {
370-
this.value = 'on';
371-
}
372-
373369
if(!this.checked) {
374370
this.checked = true;
375371
this.change.emit({ value: this.value, radio: this });

0 commit comments

Comments
 (0)