浏览代码

set label prop of ui.select only if label is not None

Falko Schindler 2 年之前
父节点
当前提交
7bf0c63bc3
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      nicegui/elements/select.py

+ 2 - 1
nicegui/elements/select.py

@@ -27,7 +27,8 @@ class Select(ChoiceElement):
         :param with_input: whether to show an input field to filter the options
         """
         super().__init__(tag='select', options=options, value=value, on_change=on_change)
-        self._props['label'] = label
+        if label is not None:
+            self._props['label'] = label
         if with_input:
             self.original_options = deepcopy(options)
             self._props['use-input'] = True