Hey there, I've got a div
that toggles hide/show like a drawer
when clicked. When the drawer is in show state, it contains a button. How can I make the button clickable without toggling the drawer? Any ideas on this?! `zIndex` doesn't seem to be working properly.
<div onClick={this.toggleDiv.bind(this, "divid")} >
<div>
<div className="hide" id="divid" style={{zIndex: "1"}}>
<br />
<button onClick={this.divRemainShowAndAlertHi(this, plateInfo)}>
click me
</button>
<br/>
</div>
</div>
</div>
divRemainsShowAndAlertHi(){
alert('Hi button click is working but drawer does not slide out')
}
toggleDiv(id){
// logic for hide/show functionality
const plateclass = document.getElementById(id);
const changedclass = plateclass.className == 'show' ? 'hide' : 'show';
plateclass.setAttribute('class', changedclass);
}