Skip to content

Commit

Permalink
fix: limit search when using showSingleCategory #212 (#273)
Browse files Browse the repository at this point in the history
  • Loading branch information
s-moran authored and scttcper committed Dec 8, 2019
1 parent 8f25f62 commit f07b62e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/lib/picker/picker.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,9 @@ export class PickerComponent implements OnInit {
}
setActiveCategories(categoriesToMakeActive: Array<EmojiCategory>) {
if (this.showSingleCategory) {
this.activeCategories = categoriesToMakeActive.filter(x => x.name === this.selected);
this.activeCategories = categoriesToMakeActive.filter(
x => (x.name === this.selected || x === this.SEARCH_CATEGORY)
);
} else {
this.activeCategories = categoriesToMakeActive;
}
Expand Down

0 comments on commit f07b62e

Please sign in to comment.