FIX: makes emoji filter case insensitive
This commit is contained in:
parent
bc9270defb
commit
f68e711fb2
|
@ -196,9 +196,10 @@ export default Ember.Component.extend({
|
||||||
$results.empty().hide();
|
$results.empty().hide();
|
||||||
$list.show();
|
$list.show();
|
||||||
} else {
|
} else {
|
||||||
|
const lowerCaseFilter = this.get("filter").toLowerCase();
|
||||||
const filterableEmojis = emojis.concat(_.keys(extendedEmojiList()));
|
const filterableEmojis = emojis.concat(_.keys(extendedEmojiList()));
|
||||||
const filteredCodes = _.filter(filterableEmojis, code => {
|
const filteredCodes = _.filter(filterableEmojis, code => {
|
||||||
return code.indexOf(this.get("filter")) > -1;
|
return code.indexOf(lowerCaseFilter) > -1;
|
||||||
}).slice(0, 30);
|
}).slice(0, 30);
|
||||||
$results.empty().html(
|
$results.empty().html(
|
||||||
_.map(filteredCodes, (code) => {
|
_.map(filteredCodes, (code) => {
|
||||||
|
|
Loading…
Reference in New Issue