Skip to content

How to set onClick event with modal? #261

Closed
@bsdo64

Description

@bsdo64

Summary:

I need to stopPropagation onClick modal on dropdown menu.
But I set Modal component with onClick event handler, event didn't fire. So behind dropdown menu is closed.
How to set onClick handler?

Steps to reproduce:

  1. Set modal with onClick
stopEvent(e) {
  e.stopPropagation();
}

<Modal
  onClick={this.stopEvent}  // Nothing happend
  ...
/>

Expected behavior:

Behind menu is closed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions