diff --git a/README.md b/README.md index e6c28f1..6dfb76b 100644 --- a/README.md +++ b/README.md @@ -23,8 +23,8 @@ import { Picker } from 'emoji-mart' | **autoFocus** | | `false` | Auto focus the search input when mounted | | **color** | | `#ae65c5` | The top bar anchors select and hover color | | **emoji** | | `department_store` | The emoji shown when no emojis are hovered | -| **include** | | `['People', 'Flags']` | Only load included categories | -| **exclude** | | `['Animals', 'Objects']` | Don't load excluded catagories | +| **include** | | `[]` | Only load included categories. Accepts [I18n categories keys](#i18n). | +| **exclude** | | `[]` | Don't load excluded categories. Accepts [I18n categories keys](#i18n). | | **emojiSize** | | `24` | The emoji width and height | | **onClick** | | | Params: `(emoji, event) => {}` | | **perLine** | | `9` | Number of emojis per line. While there’s no minimum or maximum, this will affect the picker’s width. This will set *Frequently Used* length as well (`perLine * 4`) | diff --git a/src/components/picker.js b/src/components/picker.js index 516b626..db8dcf5 100644 --- a/src/components/picker.js +++ b/src/components/picker.js @@ -43,8 +43,8 @@ export default class Picker extends React.Component { let filteredCategories = []; for (let hash of data.categories) { - let isIncluded = props.include == undefined ? true : props.include.indexOf(hash.name) > -1 - let isExcluded = props.exclude == undefined ? false : props.exclude.indexOf(hash.name) > -1 + let isIncluded = props.include == undefined ? true : props.include.indexOf(hash.name.toLowerCase()) > -1 + let isExcluded = props.exclude == undefined ? false : props.exclude.indexOf(hash.name.toLowerCase()) > -1 if (!isIncluded || isExcluded) { continue; } let new_emojis = [];