release
Etienne Lemay 2017-12-15 15:31:49 -05:00
parent 1119d60b6e
commit e78609b5c0
3 changed files with 14 additions and 9 deletions

View File

@ -61,7 +61,9 @@ const Emoji = props => {
}
let data = _getData(props)
if (!data) { return null }
if (!data) {
return null
}
let { unified, custom, short_names, imageUrl } = data,
style = {},

View File

@ -11,7 +11,12 @@ import { deepMerge, measureScrollbar } from '../utils'
import { Anchors, Category, Emoji, Preview, Search } from '.'
const RECENT_CATEGORY = { id: 'recent', name: 'Recent', emojis: null }
const SEARCH_CATEGORY = { id: 'search', name: 'Search', emojis: null, anchor: false }
const SEARCH_CATEGORY = {
id: 'search',
name: 'Search',
emojis: null,
anchor: false,
}
const CUSTOM_CATEGORY = { id: 'custom', name: 'Custom', emojis: [] }
const I18N = {
@ -465,7 +470,9 @@ export default class Picker extends React.PureComponent {
i18n={this.i18n}
recent={category.id == RECENT_CATEGORY.id ? recent : undefined}
custom={
category.id == RECENT_CATEGORY.id ? CUSTOM_CATEGORY.emojis : undefined
category.id == RECENT_CATEGORY.id
? CUSTOM_CATEGORY.emojis
: undefined
}
emojiProps={{
native: native,

View File

@ -66,13 +66,9 @@ function search(
data.categories.forEach(category => {
let isIncluded =
include && include.length
? include.indexOf(category.id) > -1
: true
include && include.length ? include.indexOf(category.id) > -1 : true
let isExcluded =
exclude && exclude.length
? exclude.indexOf(category.id) > -1
: false
exclude && exclude.length ? exclude.indexOf(category.id) > -1 : false
if (!isIncluded || isExcluded) {
return
}