Notice: The Monaca & Onsen UI Community Forum is shutting down.
For Onsen UI bug reports, feature requests and questions, please use the Onsen UI GitHub issues page. For help with Monaca, please contact Monaca Support Team.
Thank you to all our community for your contributions to the forum. We look forward to hearing from you in the new communication channels.
How to use ons-splitter modechange event?
-
From the tutorial, it said the ‘modechange’ event will be fired once component change? what component does it mean?
-
@Taymindis Regarding
ons-splitter-side
, it supports two modes: collapsed and split. When it’s in collapsed mode it will be hidden from view and can be displayed when the user swipes the screen or taps a button. In split mode the element is always shown. It can be configured to automatically switch between the two modes depending on the screen size.So when the mode changes, that event is fired. Referencing the docs here:
https://onsen.io/v2/docs/js/ons-splitter-side.html#event-modechange
Shows
event.mode
returns the current mode. Can be either “collapse” or “split”.