Coder Social home page Coder Social logo

typeahead's Introduction

Typeahead

Run these commands from the command-line.

Dependencies

npm install
bower install

Build

gulp default

Unit Tests

karma start --single-run

Options

Name Description
appendToBody If true, the dropdown-menu will be appended to the HTML body element, instead of inside the autocomplete container. Default: false
dataSource Can be either an Array or an URL. In case of an URL, Ajax is used to gather the data.
nameProperty The property that will be used as display text. Default: name
valueProperty The property that will be used as the value. Default: value
selectableProperty The property that will be used to specify if an element can be selected. If an element has selectable = false it cannot be clicked/selected. Default: selectable
notSelectableClass The class that will be rendered on the dropdown item, if it can not be selected. Default: no-select
valueField Can be either a selector or an element. Specified elements will get their value set to the value of the selected element (specified by the valueProperty option).
filter function(input, data) { ... } Function which will be used to filter the items. input contains the input value. data contains the object retrieved by the dataSource.
filterOn Event which will trigger the filter function. Will be attached to the text input field. Default: input
validation function(input, data) { ... } Function which can be used for custom validations. Has to return true if value is valid, otherwise the input field will be marked as invalid.
validateOn Event which will trigger the validation function. Will be attached to the text input field. Default: blur
onSelected Function that will be called when a value is selected.
invalidClass Class that will be set on the input, if the validation function does not return true. Default: invalid

Events

Name Description
initial-value-selected Will be triggered as soon as the initial value is selected. Initial value is optionally provided by the referenced valueField. The value will only be selected if the dataSource contains a corresponding element.

typeahead's People

Contributors

philippdrebes avatar florianbaer avatar

Watchers

James Cloos 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.