Hello,
Any idea if there’s a directive that we can add to the ion-fab-list to tell it to close when clicked outside? As it stands today, we have to explicitly click on the “x” to close it or if we click on one of the fab-buttons.
Thank you !
Hello,
Any idea if there’s a directive that we can add to the ion-fab-list to tell it to close when clicked outside? As it stands today, we have to explicitly click on the “x” to close it or if we click on one of the fab-buttons.
Thank you !
hi, this may help you https://ionicframework.com/docs/v2/api/components/fab/FabContainer/
... <ion-fab bottom right #fab> ...
fab.close();
fab
refers to your ion-fab container (#fab) parent of ion-fab-list
Thanks for that. I was thinking more of an inline directive only, without the use of js/ts.
Something like this:
<ion-fab bottom right auto-close-on-click-outside>
...
</ion-fab>
Hi there, i’m facing the same problem how did you solve it??
I haven’t yet. Sorry…
Hello Guys!
You can use ElementRef to the fab container.
Hi,
Can you explain a bit more with a brief example ? Thank you !
great help…this is working…
In Ionic 4-6:
<ion-fab #fabComponent></ion-fab>
@ViewChild('fabComponent') fabComponent: IonFab;
this.fabComponent.close();