Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 71531

ionBreakpointDidChange not firing event

$
0
0

I’m on Ionic Vue 6.2.4 and I’m not able to listen to events from the sheet modal.
This is my code, but the event is not outputting the console log.

onMounted(async () => {
    const sheetModal = await modalController.create({
        component: ListModal,
        breakpoints: [0.1, 0.5, 1],
        initialBreakpoint: 0.1,
        backdropDismiss: false,
        cssClass: "list-modal",
        backdropBreakpoint: 0.1,
        componentProps: {
        
        }
    });
    
    sheetModal.addEventListener('ionBreakpointDidChange', ev => {
        console.log('breakpoint changed', ev);
    });
    
    // Append it to ion-content so sheet modal does not overlap tab bar.
    const content = document.getElementById('ion-content');
    if (content) content.appendChild(sheetModal);
    
    await sheetModal.present();
});

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 71531

Trending Articles



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