diff --git a/README.md b/README.md index eeedb7e..c4f81f1 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ import { Picker } from 'emoji-mart' | **set** | | `apple` | The emoji set: `'apple', 'google', 'twitter', 'emojione'` | | **sheetSize** | | `64` | The emoji [sheet size](#sheet-sizes): `16, 20, 32, 64` | | **backgroundImageFn** | | ```((set, sheetSize) => …)``` | A Fn that returns that image sheet to use for emojis. Useful for avoiding a request if you have the sheet locally. | -| **emojisToShowFilter** | | ```((unicode) => true)``` | A Fn to choose whether an emoji should be displayed or not based on its unicode | +| **emojisToShowFilter** | | ```((emoji) => true)``` | A Fn to choose whether an emoji should be displayed or not | | **skin** | | `1` | Default skin color: `1, 2, 3, 4, 5, 6` | | **style** | | | Inline styles applied to the root element. Useful for positioning | | **title** | | `Emoji Mart™` | The title shown when no emojis are hovered | diff --git a/src/components/picker.js b/src/components/picker.js index ebfa418..d389077 100644 --- a/src/components/picker.js +++ b/src/components/picker.js @@ -80,9 +80,7 @@ export default class Picker extends React.Component { let newEmojis = [] for (let emoji of category.emojis) { - let unified = data.emojis[emoji].unified - - if (props.emojisToShowFilter(unified)) { + if (props.emojisToShowFilter(data.emojis[emoji] || emoji)) { newEmojis.push(emoji) } }