From 3b25024c25ffb0dd39c1885d641459c8791f2729 Mon Sep 17 00:00:00 2001 From: Steven Wu Date: Tue, 22 Oct 2024 09:23:07 -0400 Subject: [PATCH] fix: set necessity_indicator default to None (#947) - Fixes #924 - Set default of `necessity_indicator` to `None` so the prop can inherit from parents if necessary --- plugins/ui/src/deephaven/ui/components/combo_box.py | 2 +- plugins/ui/src/deephaven/ui/components/form.py | 2 +- plugins/ui/src/deephaven/ui/components/number_field.py | 2 +- plugins/ui/src/deephaven/ui/components/picker.py | 2 +- plugins/ui/src/deephaven/ui/components/radio_group.py | 2 +- plugins/ui/src/deephaven/ui/components/text_area.py | 2 +- plugins/ui/src/deephaven/ui/components/text_field.py | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/plugins/ui/src/deephaven/ui/components/combo_box.py b/plugins/ui/src/deephaven/ui/components/combo_box.py index 7fe4ef89e..80defb967 100644 --- a/plugins/ui/src/deephaven/ui/components/combo_box.py +++ b/plugins/ui/src/deephaven/ui/components/combo_box.py @@ -72,7 +72,7 @@ def combo_box( validation_state: ValidationState | None = None, label_position: LabelPosition = "top", label_align: Alignment | None = None, - necessity_indicator: NecessityIndicator | None = "icon", + necessity_indicator: NecessityIndicator | None = None, contextual_help: Element | None = None, on_open_change: Callable[[bool, MenuTriggerAction], None] | None = None, on_selection_change: Callable[[Key], None] | None = None, diff --git a/plugins/ui/src/deephaven/ui/components/form.py b/plugins/ui/src/deephaven/ui/components/form.py index ad107ef5e..57c79facd 100644 --- a/plugins/ui/src/deephaven/ui/components/form.py +++ b/plugins/ui/src/deephaven/ui/components/form.py @@ -40,7 +40,7 @@ def form( auto_capitalize: AutoCapitalizeModes | None = None, label_position: LabelPosition = "top", label_align: Alignment | None = None, - necessity_indicator: NecessityIndicator = "icon", + necessity_indicator: NecessityIndicator | None = None, on_submit: Callable[[dict[str, str]], None] | None = None, on_reset: Callable[[dict[str, str]], None] | None = None, on_invalid: Callable[[dict[str, str]], None] | None = None, diff --git a/plugins/ui/src/deephaven/ui/components/number_field.py b/plugins/ui/src/deephaven/ui/components/number_field.py index 40075d145..271f6e3c0 100644 --- a/plugins/ui/src/deephaven/ui/components/number_field.py +++ b/plugins/ui/src/deephaven/ui/components/number_field.py @@ -44,7 +44,7 @@ def number_field( name: str | None = None, label_position: LabelPosition = "top", label_align: Alignment | None = None, - necessity_indicator: NecessityIndicator = "icon", + necessity_indicator: NecessityIndicator | None = None, contextual_help: Any | None = None, on_focus: FocusEventCallable | None = None, on_blur: FocusEventCallable | None = None, diff --git a/plugins/ui/src/deephaven/ui/components/picker.py b/plugins/ui/src/deephaven/ui/components/picker.py index 214ef5e13..1f3fa4471 100644 --- a/plugins/ui/src/deephaven/ui/components/picker.py +++ b/plugins/ui/src/deephaven/ui/components/picker.py @@ -63,7 +63,7 @@ def picker( is_loading: bool | None = None, label_position: LabelPosition = "top", label_align: Alignment | None = None, - necessity_indicator: NecessityIndicator = "icon", + necessity_indicator: NecessityIndicator | None = None, contextual_help: Element | None = None, on_open_change: Callable[[bool], None] | None = None, on_focus: FocusEventCallable | None = None, diff --git a/plugins/ui/src/deephaven/ui/components/radio_group.py b/plugins/ui/src/deephaven/ui/components/radio_group.py index 1ae0a1849..2567fe9ce 100644 --- a/plugins/ui/src/deephaven/ui/components/radio_group.py +++ b/plugins/ui/src/deephaven/ui/components/radio_group.py @@ -40,7 +40,7 @@ def radio_group( error_message: Any | None = None, label_position: LabelPosition = "top", label_align: Alignment | None = None, - necessity_indicator: NecessityIndicator = "icon", + necessity_indicator: NecessityIndicator | None = None, contextual_help: Any | None = None, show_error_icon: bool | None = None, on_focus: FocusEventCallable | None = None, diff --git a/plugins/ui/src/deephaven/ui/components/text_area.py b/plugins/ui/src/deephaven/ui/components/text_area.py index 69f1b204d..67b394947 100644 --- a/plugins/ui/src/deephaven/ui/components/text_area.py +++ b/plugins/ui/src/deephaven/ui/components/text_area.py @@ -49,7 +49,7 @@ def text_area( validation_state: TextFieldValidationState | None = None, label_position: LabelPosition = "top", label_align: Alignment | None = None, - necessity_indicator: NecessityIndicator = "icon", + necessity_indicator: NecessityIndicator | None = None, contextual_help: Any | None = None, on_focus: FocusEventCallable | None = None, on_blur: FocusEventCallable | None = None, diff --git a/plugins/ui/src/deephaven/ui/components/text_field.py b/plugins/ui/src/deephaven/ui/components/text_field.py index 83f3b1a26..52debc960 100644 --- a/plugins/ui/src/deephaven/ui/components/text_field.py +++ b/plugins/ui/src/deephaven/ui/components/text_field.py @@ -48,7 +48,7 @@ def text_field( validation_state: TextFieldValidationState | None = None, label_position: LabelPosition = "top", label_align: Alignment | None = None, - necessity_indicator: NecessityIndicator = "icon", + necessity_indicator: NecessityIndicator | None = None, contextual_help: Any | None = None, on_focus: FocusEventCallable | None = None, on_blur: FocusEventCallable | None = None,