mirror of
https://github.com/flarum/core.git
synced 2025-08-04 15:37:51 +02:00
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
This commit is contained in:
@@ -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];
|
||||
|
Reference in New Issue
Block a user