Basic Usage
Enter an address
Disable select
Template
<PaperInput @label="Street Name" @value= @onChange= />
<PaperInput @label="City" @value= @onChange= />
<PaperSelect @disabled= @label="State" @options= @selected= @onChange= as |state|>
</PaperSelect>
Paper select is based on Ember power select, advanced documentation can be found here.
Select Helpers
| Option | Type | Description |
|---|---|---|
disabled |
boolean | Should the select field be disabled? Default is false. |
label |
string | Field label. Same as paper-input. |
options |
array | List of selectable options. |
selected |
object | Value of selected option. |
Option groups
Pick your pizza below
Template
<PaperSelect @options= @label="Size" @required= @selected= @onChange= as |size|>
</PaperSelect>
<PaperSelect @options= @label="Topping" @selected= @onChange= as |topping|>
</PaperSelect>
Options with async search
Select will correctly resolve any promise you pass to the options property.
Template
<PaperSelect @placeholder="Assign to a user" @selected= @options= @onChange= as |user|>
</PaperSelect>
<p>You have selected the user <code></code></p>
Select with Search
Paper select can include a paper-input field at the top of the dropdown which acts as a live filter for the paper-select options. For additional documentation on search, please refer to the power-select docs here.
Template
<PaperSelect @placeholder="Vegetable" @selected= @options= @searchField="name" @searchPlaceholder="Search for a vegetable.." @searchEnabled= @onChange= as |vegetable|>
</PaperSelect>
Select Search Helpers
| Option | Type | Description |
|---|---|---|
searchEnabled |
boolean | Enable paper-select to be searchable. Default is false. |
searchField |
string | Field name of provided options which search filter should compare against. |
searchPlaceholder |
string | Placeholder for paper-input which is displayed at top of paper-select dropdown. |