to update my last answer, always remember for whatever framework you are working in, they have done enough work to get international attention and you to use that. So, if they removed menuClose, that should be on purpuse. They have a tag ‘ion-menu-toggle’. Put your content inside it and menu wil be toggled.
Still not preventing from closing the menu. My target is when I clicked a specific item on the menu, it will not automatically close. The behavior right now is they automatically close if you clicked the <ion-item> inside <ion-menu-toggle>. I tried the menuClose on <ion-item> but it’s not working, still closing automatically.
Then just remove the wrapper of ion-item that is ion-menu-toggle. I am applying this and working too. I have 10items in menu, one of them I need to open as accordin, so I am not wrapping it with ion-menu-toggle.
@grelements, initially I had my entire menu wrapped in a <ion-menu-toggle>. This was causing my menu to close whenever I clicked on anything in the menu.
<ion-menu-toggle>
<!-- Clicking on anything in here would close the menu -->
<ion-item v-for="..."><!-- I had multiple items --></ion-item>
</ion-menu-toggle>
The two solutions that worked for me were to either remove the wrapping <ion-menu-toggle> or to prevent the click events from bubbling up from the child elements to the <ion-menu-toggle> element like so:
<ion-menu-toggle><!-- Either delete this -->
<ion-item v-for="..." @click.stop="..."><!-- Or stop click events from bubbling --></ion-item>
</ion-menu-toggle>
You should use the <ion-menu-toggle> component only when you want the menu to be toggled.
If this doesn’t solve your problem, post you code so that I can see where you may be having problems.
Also, it may be worth noting that I’m using Ionic v5.