FIX: emoji-picker filtering false positive
This commit is contained in:
parent
6d09fbde44
commit
cdefb58018
|
@ -187,8 +187,10 @@ export default Ember.Component.extend({
|
||||||
$results.empty().hide();
|
$results.empty().hide();
|
||||||
$list.show();
|
$list.show();
|
||||||
} else {
|
} else {
|
||||||
const regexp = new RegExp(this.get("filter"), "g");
|
const filterableEmojis = emojis.concat(_.keys(extendedEmojiList()));
|
||||||
const filteredCodes = _.filter(emojis.concat(_.keys(extendedEmojiList())), code => regexp.test(code)).slice(0, 30);
|
const filteredCodes = _.filter(filterableEmojis, code => {
|
||||||
|
return code.indexOf(this.get("filter")) > -1;
|
||||||
|
}).slice(0, 30);
|
||||||
$results.empty().html(
|
$results.empty().html(
|
||||||
_.map(filteredCodes, (code) => {
|
_.map(filteredCodes, (code) => {
|
||||||
const hasDiversity = isSkinTonableEmoji(code);
|
const hasDiversity = isSkinTonableEmoji(code);
|
||||||
|
|
Loading…
Reference in New Issue