Skip to content

Commit 3bbb185

Browse files
committed
fix(radio): default value for falsy values
1 parent 35aed4f commit 3bbb185

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,10 @@ 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+
369373
if(!this.checked) {
370374
this.checked = true;
371375
this.change.emit({ value: this.value, radio: this });

0 commit comments

Comments
 (0)