Przeglądaj źródła

fix on_change parameter description

Falko Schindler 2 lat temu
rodzic
commit
53a573a8df

+ 1 - 1
nicegui/elements/color_input.py

@@ -17,7 +17,7 @@ class ColorInput(ValueElement, DisableableElement):
         :param label: displayed label for the color input
         :param label: displayed label for the color input
         :param placeholder: text to show if no color is selected
         :param placeholder: text to show if no color is selected
         :param value: the current color value
         :param value: the current color value
-        :param on_change: callback to execute when the input is confirmed by leaving the focus
+        :param on_change: callback to execute when the value changes
         """
         """
         super().__init__(tag='q-input', value=value, on_value_change=on_change)
         super().__init__(tag='q-input', value=value, on_value_change=on_change)
         if label is not None:
         if label is not None:

+ 1 - 1
nicegui/elements/number.py

@@ -35,7 +35,7 @@ class Number(ValueElement, DisableableElement):
         :param prefix: a prefix to prepend to the displayed value
         :param prefix: a prefix to prepend to the displayed value
         :param suffix: a suffix to append to the displayed value
         :param suffix: a suffix to append to the displayed value
         :param format: a string like "%.2f" to format the displayed value
         :param format: a string like "%.2f" to format the displayed value
-        :param on_change: callback to execute when the input is confirmed by leaving the focus
+        :param on_change: callback to execute when the value changes
         :param validation: dictionary of validation rules, e.g. ``{'Too small!': lambda value: value < 3}``
         :param validation: dictionary of validation rules, e.g. ``{'Too small!': lambda value: value < 3}``
         """
         """
         self.format = format
         self.format = format

+ 1 - 1
nicegui/elements/textarea.py

@@ -19,7 +19,7 @@ class Textarea(Input):
         :param label: displayed name for the textarea
         :param label: displayed name for the textarea
         :param placeholder: text to show if no value is entered
         :param placeholder: text to show if no value is entered
         :param value: the initial value of the field
         :param value: the initial value of the field
-        :param on_change: callback to execute when the input is confirmed by leaving the focus
+        :param on_change: callback to execute when the value changes
         :param validation: dictionary of validation rules, e.g. ``{'Too short!': lambda value: len(value) < 3}``
         :param validation: dictionary of validation rules, e.g. ``{'Too short!': lambda value: len(value) < 3}``
         """
         """
         super().__init__(label, placeholder=placeholder, value=value, on_change=on_change, validation=validation)
         super().__init__(label, placeholder=placeholder, value=value, on_change=on_change, validation=validation)