mirror of
https://github.com/flarum/framework.git
synced 2025-04-01 13:25:13 +08: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:
parent
bddc9d96f2
commit
b0aad1a2d6
@ -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];
|
||||
|
Loading…
x
Reference in New Issue
Block a user