Skip to content

Commit

Permalink
fix(tags): tag discussion modal filters with exact matches only after…
Browse files Browse the repository at this point in the history
… first index (#3786)

* feat: Update tag filtering to include partial matches

* fix: Case insensitive filtering
  • Loading branch information
rafaucau authored Apr 10, 2023
1 parent bddc9d9 commit b0aad1a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

0 comments on commit b0aad1a

Please # to comment.