Skip to content

Dropdown item onClick not firing when clicked #211

@jonathanwmaddison

Description

@jonathanwmaddison

I'm passing down an array of items to a Dropdown component and for each I'm defining the value as a function. However, the onClick event doesn't get called when I click the item. I found that if I made a small adjustment to line 105 of Dropdown Component it works:

Current implementation:
{ className: 'Dropdown-menu__action', onClick: self.onClick.bind(self, item.value) },

Working Implementation:
{ className: 'Dropdown-menu__action', onClick: item.value },

Thanks for this nice looking UI kit!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions