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

feat(UncontrolledDropdown): add onToggle callback #1705

Merged
merged 1 commit into from
Dec 3, 2019

Conversation

TheSharpieOne
Copy link
Member

Add onToggle to UncontrolledDropdown. The purpose of this new prop is to allow the user to be informed when the dropdown is toggled (opened/closed) as well as the new state of isOpen while still being uncontrolled.
when the dropdown is toggled, onToggle is called with the event and a boolean representing the new state (true mean the dropdown is being opened, false means it is being closed).

  • Bug fix
  • New feature
  • Chore
  • Breaking change
  • There is an open issue which this change addresses
  • I have read the CONTRIBUTING document.
  • My commits follow the Git Commit Guidelines
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
    • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Add `onToggle` to `UncontrolledDropdown`. The purpose of this new prop is to allow the user to be informed when the dropdown is toggled (opened/closed) as well as the new state of `isOpen` while still being uncontrolled.
when the dropdown is toggled, `onToggle` is called with the `event` and a `boolean` representing the new state (`true` mean the dropdown is being opened, `false` means it is being closed).
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.

None yet

1 participant