Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

breaking(DropdownItem): callback with (e, props) onClick #805

Merged
merged 2 commits into from
Nov 7, 2016

Conversation

levithomason
Copy link
Member

@levithomason levithomason commented Nov 7, 2016

Breaking Change

Fixes #804.

This PR updates DropdownItem onClick to callback with the event and all props. Previously it called back with the event and value, but the docs stated it also called back with the text.

Upgrade Guide

The second DropdownItem onClick parameter is now the full props object.

BEFORE

const handleItemClick = (e, value) => {
  console.log('You clicked:', value)
}

<DropdownItem onClick={handleClick} />

AFTER

const handleItemClick = (e, props) => {
  console.log('You clicked:', props.value)
}

<DropdownItem onClick={handleClick} />

@levithomason levithomason changed the title feat(DropdownItem): callback with (e, props) onClick breaking(DropdownItem): callback with (e, props) onClick Nov 7, 2016
@levithomason levithomason merged commit 661c705 into master Nov 7, 2016
@levithomason levithomason deleted the fix/dropdown-item-onclick branch November 7, 2016 19:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant