Skip to content

[BUG] Lit MultipleChoice component has broken HTML binding and state reflection #574

@shantoislamdev

Description

@shantoislamdev

Description

The MultipleChoice component in the Lit renderer (renderers/lit) contains two significant bugs that prevent it from functioning correctly and rendering valid HTML.

Issues

1. Invalid HTML Attribute Binding

Location: renderers/lit/src/0.8/ui/multiple-choice.ts
The code incorrectly binds the option value directly as an attribute name:

// Current Code
return html`<option ${option.value}>${label}</option>`;

Result: Renders as <option valueContent>Label</option>, which is invalid HTML for a value binding.

2. Missing State Reflection

The component fails to bind the selected value to the <select> element. The UI always displays the default (first) option even if the model has a different selection.

Expected Behavior

  1. Options should render as <option value="valueContent">Label</option>.
  2. The dropdown should show the option corresponding to this.selections as selected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    In Progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions