Browse Source

Merge pull request #856 from phoskee/AutoComplete

Improve autocomplete for ui.input
Falko Schindler 2 years ago
parent
commit
6bf0480841
1 changed files with 2 additions and 1 deletions
  1. 2 1
      nicegui/elements/input.py

+ 2 - 1
nicegui/elements/input.py

@@ -57,8 +57,9 @@ class Input(ValueElement, DisableableElement):
         if autocomplete:
             def find_autocompletion() -> Optional[str]:
                 if self.value:
+                    needle = str(self.value).casefold()
                     for item in autocomplete:
-                        if item.startswith(self.value):
+                        if item.casefold().startswith(needle):
                             return item
 
             def autocomplete_input() -> None: