Ember-style select component. Mimics the behavior of a native <select> element as closely as possible.

Usage:

<FwSelect @content={{options}} @selection={{selection}} @action={{action "onChange"}} />

The above will render a select element with all of the options specified in content and the option specified in selection specified, if any.

Show:

action

Action

Action called on input update

content

Array

Array of options to render. Importantly, these options should be objects, otherwise dropdown will not function as expeced.


Default: []

optionLabelPath

String

Specifies the property of the element to be displayed as the text in the


Default: 'name'

optionValuePath

String

Optional key of the element to display as the "value" of the option element. Doesn't do anything in terms of functionality for this component.


Default: 'id'

prompt

String

If you want there to be a prompt in the select (e.g. "Select an option..."), specify it here and it will be rendered as a disabled option in the first position.

promptEnabled

Boolean

Whether or not the prompt can be selected as a valid option. This is useful if you want to allow the selection to be null.


Default: false

selection

Object

If there is an already selected object, specify it here and the select component will try to show it as the currently selected option.