-
Notifications
You must be signed in to change notification settings - Fork 75
Open
Description
Issue: Inconsistent defaultChecked type between documentation, widget builder, and Python library
According to the Checkbox documentation, the defaultChecked property is defined as a boolean.
However, in the Python SDK, its type is currently defined as a string, and in the widget builder, the defaultChecked field also expects a string input.
Widget Builder
The widget builder interface currently enforces
defaultCheckedas a string type.
Python Library Definition
class Checkbox(WidgetComponentBase):
"""Checkbox input component."""
type: Literal["Checkbox"] = Field(default="Checkbox", frozen=True)
name: str
label: str | None = None
defaultChecked: str | None = None # <-- Should this be bool instead?
onChangeAction: ActionConfig | None = None
disabled: bool | None = None
required: bool | None = NoneExpected Behavior
The defaultChecked property should consistently use a boolean type (True or False) across:
- The documentation
- The Python SDK
- The widget builder UI
Proposed Solution
-
Update the Python SDK to define:
defaultChecked: bool | None = None
-
Update the widget builder to handle boolean input (true/false) instead of string values.
-
Ensure consistency across all layers (documentation, UI, SDK).
Metadata
Metadata
Assignees
Labels
No labels
