DanLeininger / ember-power-select-typeahead

Typeahead component built on top of ember-power-select

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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';

About

Typeahead component built on top of ember-power-select

License:MIT License


Languages

Language:JavaScript 72.4%Language:HTML 23.7%Language:CSS 3.9%