Skip to content

Allow arbitrary HTML for the options with custom elements #235

@jachin

Description

@jachin

Instead of using the <select> tag to setup the options have another API "path" that would make use of custom elements. This would allow just about any markup in the options (and the groups).

So things could look something like:

<much-select>
  <much-select-option option-value="fun" slot="much-select-option-fun">
   <h1>Hurray!</h1>
   <p>So much fun</p>
  </much-select-option>
  <much-select-option option-value="bear" slot="much-select-option-bear">
   <h2>Another one</h2>
   <img src="a/picture.jpg">
  </much-select-option>
</much-select>

I think things will work out better if each option has it's own unique slot.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions