Skip to content

Consider adding named blocks #32

@pzuraq

Description

@pzuraq

Is your feature request related to a problem? Please describe.

Not really, it would just be convenient.

Describe the solution you'd like

It'd be nice to be able to use named blocks instead of @displayKey to show what the value should look like, something like:

<SelectLight
  @value={{this.selected}}
  @options={{this.options}}
  @change={{this.handleChange}} 
>
  <:option as |value|>
   {{value.name}}
  </option>
<SelectLight>
class MyComponent extends Component {
  options = [{
    id: 1,
    name: "turtle",
  }, {
    id: 2,
    name: "mako",
  }];

  @tracked selected = this.options[0];
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions