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

All event handlers should return the event data first #218

Closed
levithomason opened this issue Apr 20, 2016 · 0 comments
Closed

All event handlers should return the event data first #218

levithomason opened this issue Apr 20, 2016 · 0 comments
Milestone

Comments

@levithomason
Copy link
Member

As we rewrite away from jQuery, #206, we are no longer bound to Semantic UI event callbacks. In keeping things React friendly, all components will be required to return the event data as the first argument.

Any other helpful data can be returned after this. This will be a breaking change to the current MenuItem component as it currently returns the menu item name.

this.props.onClick(name)

will become

this.props.onClick(e, name)

This is the only breaking change, there are several other non-breaking changes that need to be made however. Note, the common test that has been written for this has currently commented out the actual assertion. See, commonTests.js it('handles events transparently'... once merged.

This issue is a reminder to address the issues above and enable the assertion ^ for event data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant