topic_list: Set typeahead to only match when the prefix matches.

This commit is contained in:
Maneesh Shukla
2025-07-04 15:55:36 +05:30
committed by Tim Abbott
parent 27587fe6b9
commit aa49b54fb4

View File

@@ -564,7 +564,7 @@ export function setup_topic_search_typeahead(): void {
return typeahead_helper.render_topic_state(item);
},
matcher(item: string, query: string) {
return item.toLowerCase().includes(query.toLowerCase());
return item.toLowerCase().startsWith(query.toLowerCase());
},
sorter(items: string[]) {
return items;