fix(tags): tag discussion modal filters with exact matches only after first index ()

* feat: Update tag filtering to include partial matches

* fix: Case insensitive filtering
This commit is contained in:
Rafał Całka 2023-04-10 22:01:18 +02:00 committed by GitHub
parent bddc9d96f2
commit b0aad1a2d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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];