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

Bug Fix: Ensure category ids are not dropped after emojisToShowFilter call #154

Merged
merged 1 commit into from
Dec 28, 2017

Conversation

mwadden
Copy link

@mwadden mwadden commented Dec 22, 2017

Providing the emojisToShowFilter function to the component was causing the following React warning:

ERROR: 'Warning: Each child in an array or iterator should have a unique "key" prop.

Check the render method of Anchors. See https://fb.me/react-warning-keys for more information.
in span (created by Anchors)
in Anchors (created by Picker)
in div (created by Picker)
in div (created by Picker)
in Picker'

The cause was that the new category that's created with the filtered results didn't have its id value specified (only its name and emojis attributes).

This PR simply adds the id field back into the category. I've added an additional test to check for it as well.

Thanks for this great component!

@EtienneLem EtienneLem merged commit 9675658 into missive:master Dec 28, 2017
@EtienneLem
Copy link
Member

Nicely spotted! Thank you 🤘

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.

2 participants