Ver código fonte

Update input.py

Introducing case insensitive autocompletition
Jacopo 2 anos atrás
pai
commit
6f242c27dd
1 arquivos alterados com 1 adições e 1 exclusões
  1. 1 1
      nicegui/elements/input.py

+ 1 - 1
nicegui/elements/input.py

@@ -58,7 +58,7 @@ class Input(ValueElement, DisableableElement):
             def find_autocompletion() -> Optional[str]:
                 if self.value:
                     for item in autocomplete:
-                        if item.startswith(self.value):
+                        if item.lower().startswith(self.value.lower()):
                             return item
 
             def autocomplete_input() -> None: