Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
js
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Bower version Gitter Chat

TypeAhead

This utility offers a type-ahead function that can be applied to input elements.

It generates a list with keywords fetched from a server.


Requirements

  • Veams >= v5.0.0 - Veams Framework.

Installation

Installation with Veams

veams install vu type-ahead

Installation with Bower

bower install veams-utility-type-ahead --save


Fields

u-type-ahead.hbs

Settings

  • settings.typeAheadClasses {String} - Modifier classes.
  • settings.typeAheadJsOptions {Object} - Options object which gets stringified.
  • settings.height {Number} - Height of suggestion list.

JavaScript Options

The module gives you the possibility to override default options:

  • currentValueClass {String} ['type-ahead__current-value'] - Current value class.
  • inputSel {String} [[data-js-item="type-ahead__input"]] - Element selector for input.
  • minLength {Number} [2] - Minimal length of input value before suggestions will be shown.
  • minLoadTime {Number} [0] - Minimal time that must have passed before new request is sent to server.
  • suggestionItemSel {String} [[data-js-item="suggestion-item"]] - Element selector for suggestion item.
  • suggestionItemSel {String} [[data-js-item="type-ahead__list"]] - Element selector for type-ahead list.
  • templates.tplSuggestionsA11y {String} ['SUGGESTIONS__A11Y'] - Template name for suggestion (list item).
  • templates.tplSuggestionsOpt {String} ['SUGGESTIONS__OPTIONS'] - Template name for option.

About

No description, website, or topics provided.

Resources

Packages

No packages published