chore(jsdoc): move comment on RadioGroup (#26558)

* chore(jsdoc): change JSDoc on RadioGroup to double slash (//) comment

This converts a multiline comment (like `/**...*/`) above the
`RadioGroup` component class to be a series of `//` comments instead.
This is done to prevent the comment from being accidentally recognized
as a JSDoc comment for the class when a Stencil version incorporating
this change is installed:
2e4b1fcdc0

* move down to the relevant line, keep as multi-line comment
This commit is contained in:
Alice
2023-01-04 12:28:30 -05:00
committed by GitHub
parent 1e9cf12a74
commit c238ede622

View File

@ -4,12 +4,6 @@ import { Component, Element, Event, Host, Listen, Prop, Watch, h } from '@stenci
import { getIonMode } from '../../global/ionic-global'; import { getIonMode } from '../../global/ionic-global';
import type { RadioGroupChangeEventDetail } from '../../interface'; import type { RadioGroupChangeEventDetail } from '../../interface';
/**
* The Radio Group component mandates that only one radio button
* within the group can be selected at any given time. Since `ion-radio`
* is a shadow DOM component, it cannot natively perform this behavior
* using the `name` attribute.
*/
@Component({ @Component({
tag: 'ion-radio-group', tag: 'ion-radio-group',
}) })
@ -91,6 +85,12 @@ export class RadioGroup implements ComponentInterface {
private onClick = (ev: Event) => { private onClick = (ev: Event) => {
ev.preventDefault(); ev.preventDefault();
/**
* The Radio Group component mandates that only one radio button
* within the group can be selected at any given time. Since `ion-radio`
* is a shadow DOM component, it cannot natively perform this behavior
* using the `name` attribute.
*/
const selectedRadio = ev.target && (ev.target as HTMLElement).closest('ion-radio'); const selectedRadio = ev.target && (ev.target as HTMLElement).closest('ion-radio');
if (selectedRadio) { if (selectedRadio) {
const currentValue = this.value; const currentValue = this.value;