drawer icon indicating copy to clipboard operation
drawer copied to clipboard

Cannot read property 'style' of undefined

Open GR34SE opened this issue 7 years ago • 3 comments

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

GR34SE avatar Apr 02 '19 08:04 GR34SE

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

orcwarrior avatar Apr 11 '19 08:04 orcwarrior

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

jljsj33 avatar Apr 16 '19 06:04 jljsj33

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>)
  }
}

Hideman85 avatar May 08 '19 08:05 Hideman85