Typeahead component built on top of ember-power-select
Clone or download

README.md

Ember-power-select-typeahead

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

Demo

Installation

ember install ember-power-select-typeahead

Usage

With simple strings:

{{#power-select-typeahead search=(action 'searchAsync') selected=selected onchange=(action (mut selected)) as |number|}}
  {{number}}
{{/power-select-typeahead}}

With complex objects:

{{#power-select-typeahead search=(action 'searchAsync') selected=selected extra=(hash labelPath="name") onchange=(action (mut selected)) as |user|}}
  {{user.name}}
{{/power-select-typeahead}}

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
*/

/*if using a theme
@import 'ember-power-select/themes/material';
*/

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