浏览代码

Merge pull request #856 from phoskee/AutoComplete

Improve autocomplete for ui.input
Falko Schindler 2 年之前
父节点
当前提交
6bf0480841
共有 1 个文件被更改,包括 2 次插入1 次删除
  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: