Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RTL not working as expected #8

Open
amos80m opened this issue Jul 27, 2021 · 0 comments
Open

RTL not working as expected #8

amos80m opened this issue Jul 27, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@amos80m
Copy link

amos80m commented Jul 27, 2021

Describe the bug
React native in force RTL not working as expected,
on RTL mode the view will slide to left, but the menu will be left:0 so won't be shown

To Reproduce
on react native web set all view on direction: RTL
and add in sidemenu prop "menuPosition="right"

Platform:

  • React Native version: 0.63.2
  • Library Version: 1.3.2

Fix
on index.js line 265
I changed:

const boundryStyle = this.props.menuPosition === 'right'
      ? { left: this.state.width - this.state.openMenuOffset }
      : { right: this.state.width - this.state.openMenuOffset };

    const menu = (
      <View style={[styles.menu, boundryStyle]}>
        {this.props.menu}
      </View>
    );

to:

const menu = (
      <View style={[styles.menu, { right: this.state.width - this.state.openMenuOffset }]}>
        {this.props.menu}
      </View>
    );

and line 327 I marked this:
// {"mode":"full","isActive":false}

Now it is working smoothly on LTR & RTL mode.
thx

@amos80m amos80m added the bug Something isn't working label Jul 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant