Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 48981

Sheet Modal presents two modals upon rapid clicking

$
0
0

I noticed that in a project that I was working on, along with the reference document examples, that when you are using a Sheet Modal and you click the button to present the modal in rapid succession, you can launch multiple modals.

async edit(item: Item) {
        const modal = await this.modalCtrl.create({
            component: ModalPage,
            componentProps: { id: item.id },
            breakpoints: [0, 0.6],
            initialBreakpoint: 0.6
        });

        modal.onWillDismiss().then(() => {
            const slidingItem = document.getElementById('item-' + item.id) as any;
            slidingItem.close();
        });
        
        await modal.present();
    }

Is this an issue, or have I just implemented incorrectly?

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 48981

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>