Hi using Ionic Angular v8 but have had this issues over majority of versions of Ionic last couple of years. In short we have large application wher have lazy loaded modules/pages (eg loadChildren in the route).
Randomly when we have an action sheet in a component the action buttons/options do not show. That is it just popups with no options/blank. This happens alot on mobile and sometimes on desktop.
Although it randomly happens it seems to only occur when we run an update of our app (ie new app is available) and its fetched the through the service worker. To fix we have to close the app and then reopen which is not ideal.
Has anyone else come across this issue? Any idea why it occurs and potential work arounds?
We dynamically load buttons like below:
const actionSheet = await this.actionSheetCtrl.create({
header: title,
buttons: this.getLookupButtons(ev.element, ev.cell,ev.value)
});
return await actionSheet.present();
The buttons have ionic icons like below:
getLookupButtons(element: FormElement, cell: FormCellReference,value:any): any[] {
let lookup: FormElementLookup = element.lookup;
let buttons: any[] = [];
let button: any
if (!element.lookup.is_disable_manual_entry) {
let buttonName: string = 'Open Record'
button = {
text: buttonName,
icon: 'create-outline',
handler: () => {
/// some function
}
}
buttons.push(button);
return buttons;
}