Skip to content
This repository has been archived by the owner on Mar 4, 2020. It is now read-only.

fix(List): handle onClick and onFocus on items correctly #779

Merged
merged 5 commits into from
Jan 30, 2019

Conversation

layershifter
Copy link
Member

Fixes #680.

@layershifter layershifter added 🚀 ready for review 🧰 fix Introduces fix for broken behavior. labels Jan 30, 2019
@@ -85,6 +86,7 @@ class ListItem extends UIComponent<ReactProps<ListItemProps>, ListItemState> {
media: PropTypes.any,

selectable: PropTypes.bool,
index: PropTypes.number,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, Menu does the same thing

.first()
.simulate('click')

expect(onClick).toHaveBeenCalled()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't you want to check cb params as well?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done 👍

@layershifter layershifter merged commit 5d1ad21 into master Jan 30, 2019
@layershifter layershifter deleted the fix/list-onclick branch January 30, 2019 11:22
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🧰 fix Introduces fix for broken behavior. 🚀 ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants