• Onsen UI

    The <ons-splitter-side> element is used as a child element of <ons-splitter>. It will be displayed on either the left or right side of the <ons-splitter-content> element. 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.

    Click here to see the original article

  • Hello

    How can we open/close the menu from a state/props attribute?

    The component SplitterSide has no attribute to indicate if we want it to be opened or closed. The only way I see is something like this:

            <SplitterSide postclose={actions.closeMenu} ref={ instance => {
                                if (instance) {
                                    let el = ReactDOM.findDOMNode(instance);
                                    if (props.isOpen && !el.isOpen) {
                                    } else if (!props.isOpen && el.isOpen) {
                            } }>

    which is overcomplicated and does not work as well as expected.

  • @guirip220: Forget about it. Works much better when looking at the react section of your documentation!

Log in to reply