open-vault/ui/stories/search-select.md
Madalyn 43f4c5532d use ember-power-select-with-create instead of ember-power-select (#6728)
* use ember-power-select-with-create instead of ember-power-select

* add custom Add message to clarify whether you need a name or ID

* add search-select to storybook

* add wormhole div for ember-basic-dropdown

* add search-select to storybook

* make sure knobs are working

* remove unused code
2019-06-03 15:25:59 -05:00

1.5 KiB

SearchSelect

The SearchSelect is an implementation of the ember-power-select-with-create used for form elements where options come dynamically from the API.

Param Type Description
id String The name of the form field
models String An array of model types to fetch from the API.
onChange Func The onchange action for this form field.
inputValue String A comma-separated string or an array of strings.
[helpText] String Text to be displayed in the info tooltip for this form field
label String Label for this form field
fallbackComponent String name of component to be rendered if the API call 403s

Example

<SearchSelect @id="group-policies" @models={{["policies/acl"]}} @onChange={{onChange}} @inputValue={{get model valuePath}} @helpText="Policies associated with this group" @label="Policies" @fallbackComponent="string-list" />

See