open-vault/ui/stories/search-select.md

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