+
= top && -height - (parentHeight + this.virtualizeOffset) <= top) {
this.filteredEmojisSubject.next(this.emojis);
+ } else {
+ this.filteredEmojisSubject.next([]);
}
}
@@ -269,4 +276,19 @@ export class CategoryComponent implements OnChanges, OnInit, AfterViewInit {
trackById(index: number, item: any) {
return item;
}
+
+ private filterEmojis(): any[] {
+ const newEmojis = [];
+ for (const emoji of this.emojis || []) {
+ if (!emoji) {
+ continue;
+ }
+ const data = this.emojiService.getData(emoji);
+ if (!data || (data.obsoletedBy && this.hideObsolete) || (!data.unified && !data.custom)) {
+ continue;
+ }
+ newEmojis.push(emoji);
+ }
+ return newEmojis;
+ }
}
diff --git a/src/lib/picker/ngx-emoji/emoji.component.ts b/src/lib/picker/ngx-emoji/emoji.component.ts
index 709908a..c433652 100644
--- a/src/lib/picker/ngx-emoji/emoji.component.ts
+++ b/src/lib/picker/ngx-emoji/emoji.component.ts
@@ -5,7 +5,6 @@ import {
Input,
OnChanges,
Output,
- SimpleChanges,
} from '@angular/core';
import { EmojiData } from './data/data.interfaces';
diff --git a/src/lib/picker/preview.component.ts b/src/lib/picker/preview.component.ts
index ec9d792..eb13900 100644
--- a/src/lib/picker/preview.component.ts
+++ b/src/lib/picker/preview.component.ts
@@ -1,3 +1,4 @@
+import { Emoji, EmojiData, EmojiService } from '@ctrl/ngx-emoji-mart/ngx-emoji';
import {
ChangeDetectionStrategy,
ChangeDetectorRef,
@@ -5,11 +6,9 @@ import {
EventEmitter,
Input,
OnChanges,
- Output,
- SimpleChanges,
+ Output
} from '@angular/core';
-import { Emoji, EmojiData, EmojiService } from '@ctrl/ngx-emoji-mart/ngx-emoji';
@Component({
selector: 'emoji-preview',