I thought the issue was with (click), as click is been used in the browser (working) but in mobile it is a touch not click (not working). So I have tried up with on-touch, (ontouchend) instead of (click) but nothing is working.
Later I feel that problem is with this below code snippet.
var event: HTMLElement = document.getElementById(id) as HTMLElement;
event.click();`
This is my code
.html
<ion-item>
<ion-label class="amount-label pr1">Other</ion-label>
<ion-radio id="other" class="mr2" mode="md" slot="start" value="other" (click)="toggleAmount('O')">
</ion-radio>
<div class="mt3 other-dollar">
<ion-input currencyTypo class="other-amount-section" placeholder="0.00" (input)="validateAmount($event.target.value)" maxLength="7" type="number" pattern="^\d* (\.\d{0,2})?$" (click)="checkRadio('other')" formControlName = "otherAmount">
<div class="dib pr1">$</div>
</ion-input>
</div>
</ion-item>
.ts
checkRadio(id: string) {
var event: HTMLElement = document.getElementById(id) as HTMLElement;
event.click();
}
I expect the radio button should checked as soon as i clicked on the ion-text field.