MCPcopy Create free account
hub / github.com/angular/components / _onInputInteraction

Method _onInputInteraction

src/material/radio/radio.ts:692–710  ·  view source on GitHub ↗

Triggered when the radio button receives an interaction from the user.

(event: Event)

Source from the content-addressed store, hash-verified

690
691 /** Triggered when the radio button receives an interaction from the user. */
692 _onInputInteraction(event: Event) {
693 // We always have to stop propagation on the change event.
694 // Otherwise the change event, from the input element, will bubble up and
695 // emit its event object to the `change` output.
696 event.stopPropagation();
697
698 if (!this.checked && !this.disabled) {
699 const groupValueChanged = this.radioGroup && this.value !== this.radioGroup.value;
700 this.checked = true;
701 this._emitChangeEvent();
702
703 if (this.radioGroup) {
704 this.radioGroup._controlValueAccessorChangeFn(this.value);
705 if (groupValueChanged) {
706 this.radioGroup._emitChangeEvent();
707 }
708 }
709 }
710 }
711
712 /** Sets the disabled state and marks for check if a change occurred. */
713 protected _setDisabled(value: boolean) {

Callers

nothing calls this directly

Calls 2

_emitChangeEventMethod · 0.95
_emitChangeEventMethod · 0.65

Tested by

no test coverage detected