From 289fc0ffc05753ffe3f87545c5f96e95a53aca75 Mon Sep 17 00:00:00 2001 From: Jakob Krigovsky Date: Fri, 26 May 2017 10:21:18 +0200 Subject: [PATCH] Pass custom emoji data directly to calls getData() itself which will fail for custom emojis because there is no universally available data source for custom emojis. To work around this, we pass the custom emoji data (which received via the `custom` prop) directly to . --- src/components/picker.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/picker.js b/src/components/picker.js index 84c008b..b77fbf5 100644 --- a/src/components/picker.js +++ b/src/components/picker.js @@ -152,7 +152,8 @@ export default class Picker extends React.Component { handleEmojiOver(emoji) { var { preview } = this.refs - preview.setState({ emoji: emoji }) + const emojiData = CUSTOM_CATEGORY.emojis.find(customEmoji => customEmoji.id === emoji.id) + preview.setState({ emoji: Object.assign(emoji, emojiData) }) clearTimeout(this.leaveTimeout) }