feat: toggle menu when ion-split-pane is visible
See original GitHub issueI’m using <ion-split-pane>
and I need the menu toggle button on all screen sizes, how can I achieve this?
In desktop toggle menu doesn’t appear, and <ion-menu-button></ion-menu-button>
exists in all pages’ toolbar.
Toggle menu only show up in the mobile view, but I want this in desktop view also.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:21 (4 by maintainers)
Top Results From Across the Web
ion-menu-toggle - Ionic Framework
The MenuToggle component can be used to toggle a menu open or closed—by default, it's only visible when the selected menu is active....
Read more >Ionic 3 split pane menu toggle not displayed - Stack Overflow
This way when the pane is shown it'll not show the menu button, but when in smaller screens and the pane is hidden,...
Read more >July 6, 2020, 4:08 am - Ionic Framework - Ionic Forum
Upcoming feat: upload through http return progress and response ... <ion-menu-toggle auto-hide="false"> <ion-item *ngFor="let nav of navi" button ...
Read more >How to Create an Effective Ionic Menu With and Without a ...
Use an ngFor directive inside of an ion-menu-toggle component. ... attribute to the ion-split-pane to indicate when you want it visible.
Read more >Logo Design, Web Design and E-commerce ... - The Branding Store
Remember that the function acts like a toggle, removing the comic if it was ... <IonSplitPane contentId="main"> <Menu appPages={appPages} /> <IonPage ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Add a click handler on the standard ion-menu-toggle button. Make sure ‘auto-hide=“false”’ is set on the toggle so the button is always visible even in split pane mode.
In the event handler, check the ion-split-pane ‘when’ attribute against the ionic media query breakpoints (or directly if not using a breakpoint alias). If the screen width is large enough to usually show the split panel, toggle the visibility to toggle the menu display.
The default click handler to animate menu in single pane view still works as per normal.
Only you need to add
when="false"
inion-menu-toggle
Example: