Skip to content

Commit

Permalink
feat: Ignore casing for autocompletions
Browse files Browse the repository at this point in the history
  • Loading branch information
Zachatoo committed Oct 22, 2024
1 parent f8e3f65 commit 5fadbd5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/editor/Autocomplete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@ export class Autocomplete extends EditorSuggest<TpSuggestDocumentation> {
if (!suggestions) {
return [];
}
return suggestions.filter((s) => s.queryKey.startsWith(context.query));
return suggestions.filter((s) =>
s.queryKey.toLowerCase().startsWith(context.query.toLowerCase())
);
}

renderSuggestion(value: TpSuggestDocumentation, el: HTMLElement): void {
Expand Down

0 comments on commit 5fadbd5

Please sign in to comment.