From b0aad1a2d687a2abee7266f80d17d7fb8b8afd4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Ca=C5=82ka?= Date: Mon, 10 Apr 2023 22:01:18 +0200 Subject: [PATCH] fix(tags): tag discussion modal filters with exact matches only after first index (#3786) * feat: Update tag filtering to include partial matches * fix: Case insensitive filtering --- extensions/tags/js/src/common/components/TagSelectionModal.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/tags/js/src/common/components/TagSelectionModal.tsx b/extensions/tags/js/src/common/components/TagSelectionModal.tsx index 9b61ad53a3..d0f275f8a3 100644 --- a/extensions/tags/js/src/common/components/TagSelectionModal.tsx +++ b/extensions/tags/js/src/common/components/TagSelectionModal.tsx @@ -260,7 +260,7 @@ export default class TagSelectionModal< // If the user has entered text in the filter input, then filter by tags // whose name matches what they've entered. if (filter) { - tags = tags.filter((tag) => tag.name().substring(0, filter.length).toLowerCase() === filter); + tags = tags.filter((tag) => tag.name().toLowerCase().includes(filter)); } if (!this.indexTag || !tags.includes(this.indexTag)) this.indexTag = tags[0];