浏览代码

Update input.py

Introducing case insensitive autocompletition
Jacopo 2 年之前
父节点
当前提交
6f242c27dd
共有 1 个文件被更改,包括 1 次插入1 次删除
  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: