Skip to content

Inconsistent defaultChecked type between documentation, widget builder, and Python library #35

@sontx

Description

@sontx

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 defaultChecked as a string type.
Widget Builder Screenshot

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 = None

Expected 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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions