Explorar el Código

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

Falko Schindler hace 2 años
padre
commit
7bf0c63bc3
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  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