•  
      request #19337 ListPicker should not select the first list item in some cases
    Infos
    #19337
    Thomas Gorka (tgorka)
    2021-02-19 17:06
    2021-02-19 15:54
    20906
    Details
    ListPicker should not select the first list item in some cases

    I'll explain it here:

    During its initialization, the list-picker removes empty options (e.g: <option value=""></option>  it finds in the source <select>.

    The main reason is that we don't want to display an empty item in the dropdown. Also, this option was considered useless since we control the selected values programmatically,

    Nevertheless, it did not come in our mind that HTMLSelectElements auto-select the first option inside the list of options, even if we do not select it using the selected attribute.

    Thus, we should still ignore these options, but we should not remove them, otherwise, placeholders are never shown at initialization.

    This issue does not happen in multi-list-pickers.

    Trackers
    Empty
    Empty
    • [ ] enhancement
    • [ ] internal improvement
    Empty
    Stage
    Thomas Gorka (tgorka)
    Closed
    2021-02-19
    Attachments
    Empty
    References

    Follow-ups