Code Monkey home page Code Monkey logo

ember-typeahead's Introduction

Ember-typeahead

ember-typeahead is an ember-cli addon that wraps up the typeahead.js and Tokenfield for Boostrap plugins and exposes them through a single ember component.

Usage

Typeahead

The default usage of the type-ahead component gives the consumer a typeahead.js search:

  {{type-ahead
    id="typeahead-id"
    content=contentArray
    displayKey="name"
    valueToken="name"
    placeholder="Search by name"
    class="form-control"
    selectOnEnter=true
    suggestionTemplate=suggestionTemplate
    emptyTemplate=emptyTemplate
    limit=numberofresultstodisplay
    onSelectAction="ActionToRunOnSelect"}}

Tokenized

Switching the typeahead from a typeahead.js function to a Tokenfield for Bootstrap function is as simple as passing tokenized=true into the component as well as setting the value property to a comma-delimited string of values that will be bound as the tokenized list of items selected in the input.

 {{type-ahead
   id="typeahead-id"
   tokenized=true
   value=selectedApps
   content=contentArray
   displayKey="name"
   valueToken="name"
   placeholder="Search by name"
   class="form-control"
   suggestionTemplate=suggestionTemplate
   emptyTemplate=emptyTemplate}}

Installation

  • git clone this repository
  • npm install
  • bower install

Running

Further Reading / Useful Links

ember-typeahead's People

Contributors

dhaulagiri avatar ember-tomster avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.