1

I have a div that wrap a component

clickComponentA = () => {
   //how to trigger a click on ComponentA?
}
render(){
   return(<div onClick={this.clickComponentA}>
    <ComponentA />
    </div>)
}

And for some reason the ComponentA has height 1px; how can I trigger a click on ComponentA when user click on somewhere else? like click on the div tag?

Alex Yong
  • 7,425
  • 8
  • 24
  • 41
  • wasn't this question answered here: http://stackoverflow.com/questions/39913863/how-to-manually-trigger-click-event-in-reactjs – funcoding Apr 08 '17 at 14:38
  • Possible duplicate of [How to manually trigger click event in ReactJS?](http://stackoverflow.com/questions/39913863/how-to-manually-trigger-click-event-in-reactjs) – yogi Apr 08 '17 at 16:21
  • @Yuval can you take a look on this? http://stackoverflow.com/questions/43295907/trigger-react-dropzone-with-ref-doesnt-work – Alex Yong Apr 08 '17 at 16:29

0 Answers0