Skip to content

Commit a9021e3

Browse files
committed
fix(radio): ngModelChange fires multiple times
1 parent 8b1561d commit a9021e3

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

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

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -317,10 +317,15 @@ export class IgxRadioComponent implements ControlValueAccessor, EditorProvider {
317317
this.nativeRadio.nativeElement.blur();
318318
}
319319

320-
this.checked = true;
321-
this.focused = false;
322-
this.change.emit({ value: this.value, radio: this });
323-
this._onChangeCallback(this.value);
320+
if(this.focused) {
321+
this.focused = false;
322+
}
323+
324+
if(!this.checked) {
325+
this.checked = true;
326+
this.change.emit({ value: this.value, radio: this });
327+
this._onChangeCallback(this.value);
328+
}
324329
}
325330

326331
/**

0 commit comments

Comments
 (0)