Pass custom emoji data directly to <Preview />
<Preview /> 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 <Picker /> received via the `custom` prop) directly to <Preview />.release
parent
7ce0f8efba
commit
289fc0ffc0
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue