Skip to content

[Select] What to do with selectedcontent when multiple select is set with size 1 #1355

@brechtDR

Description

@brechtDR

I think this might be an interesting topic to discuss in the (near?) future.

I was wondering how a <selectedcontent> should behave when multiple select is set with a size="1"

<select multiple size="1">
  <button>
    <selectedcontent></selectedcontent>
  </button>
  <option>option</option>
  <option>option 2</option>
  <option>option 3</option>
</select>

I like the idea of it outputting every selected option right after each other instead of 2 selected, 3 selected when more than 1 item is selected.

I would not foresee any comma separation for this, as this can probably easily be customized with pseudo-elements.

<select multiple size="1">
  <button>
    <selectedcontent></selectedcontent>
  </button>
  <option><div class="wrapper">option</div></option>
  <option><div class="wrapper">option2</div></option>
  <option><div class="wrapper">option3</div></option>
</select>
selectedcontent .wrapper::after {
  content: ',';
}

I thought this was a good idea, but other suggestions are more than welcome. It should at least be looked into.

Metadata

Metadata

Assignees

No one assigned

    Labels

    agenda+Use this label if you'd like the topic to be added to the meeting agendaselectThese are issues that relate to the select component

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions