pors / reactionic

React Ionic: We are looking for a new maintainer!

Home Page:http://reactionic.github.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

IonSideMenu: would be nice to have the possibility to set the width of the side menu

RobDong opened this issue · comments

commented

Like the angular version
[http://ionicframework.com/docs/api/directive/ionSideMenu/]

<IonSideMenu width={myWidth}>
</IonSideMenu>

@RobDong seems useful. We'll have a look at it. If you can create a simple solution yourself, please fork and create a Pull request.

@RobDong I think you can. reactionic uses snap.js internally to accomplish the side menus. It has settings for minPosition and maxPosition that might be what you are looking for. You just have to render the IonSideMenuContainer with the correct options. Something like the following:

      <IonSideMenuContainer
        settings={{
          maxPosition: 400,
        }}
        {...this.props}
      >

Let us know if that get you what you need.

commented

@johnslemmer Yes thank you :).
This is what I came up with for having a full screen sidebar :

let windowWidth = window.innerWidth;
this.context.ionSnapper.settings({minPosition: '-' + windowWidth});
this.context.ionSnapper.settings({maxPosition: windowWidth});

Resolved, so closing