I am using ion-radio-group with ngModel with hide/show functionality. Below is my UI code for view.
<ion-button (click)="showSection()" size="small" >show</ion-button>
<ion-button (click)="hideSection()" size="small" >show</ion-button>
<ion-list style="margin-bottom: 0px;" *ngIf="show">
<ion-radio-group [(ngModel)]="payment.paytype">
<ion-list-header>
Select Payment Method
</ion-list-header>
<ion-item>
<ion-label>Online</ion-label>
<ion-radio value="online"></ion-radio>
</ion-item>
<ion-item>
<ion-label>Token</ion-label>
<ion-radio value="token"></ion-radio>
</ion-item>
</ion-radio-group>
</ion-list>
This is my hide/show code on controller.
show:boolean;payment={}
async showSection()
{
this.show = true;
}
async hideSection()
{
this.show = false;
}
Issue came when i select radio and performing hide show operation. My UI get freezes. Please help me to solve this issue. Your help would be appreciated. Thanks in Advance. I am using Ionic 4.
Note: - If i am not selecting radio and doing hide/show no issue is coming. Issue is coming only when i selected the radio and then hide/show.