5.1.0 • Published 6 years ago
veams-utility-type-ahead v5.1.0
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
Fields
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.