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

Drawer has css wrong effect for rtl dir #40

Open
foubei opened this issue Aug 29, 2018 · 3 comments
Open

Drawer has css wrong effect for rtl dir #40

foubei opened this issue Aug 29, 2018 · 3 comments

Comments

@foubei
Copy link

foubei commented Aug 29, 2018

Hello,

I am trying i18n for drawer component. So I switch dir between ltr and rtl. Also I put drawer position to left for ltr and right for rtl. It works correctly for ltr but the css got mess up for rtl. Need some help...

<Drawer
        className={style.sideBar}
        level={null}
        onHandleClick={this.onCollapse}
        onMaskClick={this.onCollapse}
        open={!collapsed}
        placement={locale === 'ar' ? 'right' : 'left'}
        width={256}
/>

ltr drawer closed
ltr drawer opened
rtl drawer closed
rtl drawer opened

Best Regards,
F. Tahir

@jljsj33
Copy link
Member

jljsj33 commented Aug 30, 2018

@jljsj33
Copy link
Member

jljsj33 commented Aug 30, 2018

onChange = (value) => {
    this.setState({
      placement: value,
      width: value === 'right' || value === 'left' ? '20vw' : null,
      height: value === 'right' || value === 'left' ? null : '20vh',
      childShow: false, // 删除子级,删除切换时的过渡动画。。。
    }, () => {
      this.setState({
        childShow: true,
      });
    });
  }

@vlknhslk
Copy link

Is anybody fixed this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants