Skip to content
Snippets Groups Projects
Commit 9513f7e6 authored by Kyle Doherty's avatar Kyle Doherty Committed by GitHub
Browse files

allow modal triggers to nest inside links (#4940)

parent 54247e58
No related branches found
No related tags found
No related merge requests found
......@@ -109,7 +109,10 @@ export default ComposedComponent => class extends Component {
<a
id={triggerId}
ref="trigger"
onClick={!this.props.disabled && (() => this.toggle())}
onClick={(event) => {
event.preventDefault()
!this.props.disabled && this.toggle()
}}
className={cx(triggerClasses, isOpen && triggerClassesOpen, "no-decoration", {
'cursor-default': this.props.disabled
})}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment