cibernox / ember-power-select-typeahead

Typeahead component built on top of ember-power-select
MIT License
37 stars 57 forks source link

Ember-power-select-typeahead

Naive implementation of a typeahead component on top of ember-power-select.

Compatibility

Installation

Installation

ember install ember-power-select-typeahead

Usage

With simple strings:

<PowerSelectTypeahead @search={{action 'searchAsync'}} @selected={{selected}} @onChange={{action (mut selected)}} as |number|>
  {{number}}
<PowerSelectTypeahead>

With complex objects:

<PowerSelectTypeahead @search={{action 'searchAsync'}} @selected={{selected}} @extra={{hash labelPath="name"}} @onChange={{action (mut selected)}} as |user|>
  {{user.name}}
</PowerSelectTypeahead>

Note: See API reference for ember-power-select for additional options you can pass to ember-power-select-typeahead

Styles

In your app's stylesheet, you must import the built-in styles in this order:

/*
your custom variables goes here
*/

Contributing
------------------------------------------------------------------------------

See the [Contributing](CONTRIBUTING.md) guide for details.

License
------------------------------------------------------------------------------

@import 'ember-power-select';
@import 'ember-power-select-typeahead';