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

Changes HTML events config to return a list item instead of an ID. #47

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

fbonetti
Copy link

Hey Greg! Hope you've been well since elm-conf.

In my use, I've found that returning IDs in the event handlers requires an additional lookup to find the original data. When I click on an item, I want to have access to it immediately instead of having to look it up by ID.

This PR changes the type signature of onMouseEnter, onMouseLeave, and onMouseClick from String -> Maybe msg (where String is the item's ID) to data -> Maybe msg. It also changes the type signature of onKeyDown to return an item.

What do you think?

(cc/ @isaacsanders)

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