Currently, I am in the process of developing an ionic app that includes a radio list on one of the pages. However, I have encountered an issue where the radio list does not clear when I navigate to the next screen and then return, resulting in a poor user experience. After some research, I have come up with two potential solutions:
- Implement a function to uncheck the list, possibly by utilizing ionViewWillEnter. I have experimented with [checked] but it did not provide a satisfactory solution.
- Find a way to prevent caching of this specific page.
I have searched extensively for information on how to implement either of these solutions but have not found much. Do you have any ideas on how to resolve this issue?
Below is the code snippet for the list:
<ion-list radio-group class="size-list">
<ion-list-header class="size-list-header" text-center>
{{"Size and prices" | translate}}
</ion-list-header>
<ion-item *ngFor="let item of menuItems.price; let i= index" class="size-list-item">
<ion-label *ngIf="item.specialPrice"> {{item.pname}}
<span class="cut">
${{item.value}}
</span>
<span class="offer-p">
${{item.specialPrice |number:0}}
</span>
</ion-label>
<ion-label *ngIf="!item.specialPrice">
{{item.pname}} ${{item.value}}
</ion-label>
<ion-radio class="checked" [checked]="isChecked==true" (ionSelect)="sizeOptions(item)"></ion-radio>
</ion-item>
</ion-list>