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

Cannot read property 'style' of undefined #79

Open
GR34SE opened this issue Apr 2, 2019 · 3 comments
Open

Cannot read property 'style' of undefined #79

GR34SE opened this issue Apr 2, 2019 · 3 comments

Comments

@GR34SE
Copy link

GR34SE commented Apr 2, 2019

It is appearing only on initial render of an Drawer, after the error everything seems to work fine. I've tested in on 3.10.4 and 3.16.1. Any idea how to solve this?

Screenshot_208

Usage:
<Drawer title={drawerHeaderText} width={drawerWidth} onClose={this.onClose} visible={store && store.drawerOpened}> <div className="drawer-inside-wrapper"> <AddToCartForm/> {this.renderProceedButton()} <CartView/> </div> </Drawer>

Potentially related to #39

@orcwarrior
Copy link

Hi!
I've encountered same problem, any ideas how to resolve that?

@jljsj33
Copy link
Member

jljsj33 commented Apr 16, 2019

I need to reproduce. https://codesandbox.io/s/ww0r05ry7

@Hideman85
Copy link

Currently a quick fix for bring to live your application while waiting a fix from ant design:

import MediaQuery from 'react-responsive'

class DrawerWrapper extends React.Component {
  render() {
    //  Use your screen size break for small devices
    return (<MediaQuery maxWidth={768}>
      <Drawer {...this.props}/>
    </MediaQuery>)
  }
}

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

4 participants