Skip to content

No select example? #711

Closed
Closed
@antony

Description

@antony

I have a select box in my component which binds a value using two-way bindings.

<select bind:value='duration'>
        {{ #each durations as dur }}
          <option value="{{ dur }}">{{ dur }} months</option>
        {{ /each }}
      </select>

The component is nested inside a modal component which can show and hide.

It seems that when I hide and re-show the modal, whilst the 'duration' value has been persisted, the select has reset to the initial list item.

It seems like the two-way binding doesn't bind the selected value correctly.

It also appears that there is no <select> example available in the REPL.

Is there another binding I require, or is this an issue?

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