0.10.4 • Published 6 years ago

dcx-typeahead v0.10.4

Weekly downloads
-
License
ISC
Repository
-
Last release
6 years ago

Typeahead/autosuggest plugin for Ajax-datasources

Best used in combination with dcx-wasabi

Installation

npm install -D dcx-typeahead

Usage

Include the typeahead plugin:

const typeahead = require('dcx-typeahead')

Instantiate the plugin on a text input:

typeahead(document.querySelector('input[type="text"]') [,options, project])

Arguments

options

The following options can be passed in as an object:

OptionDescriptionDefault
autosuggest.templateTemplate used to render the results in the autosuggest<li>{{suggest}}</li>
autosuggest.maxResultsNumber of results that are parsed in the autosuggest list5
autosuggest.resultsMaxHeightHeight in pixels necessary to show the results below the input field100
classObject with classes added to the typeahead elements.{ activeItem: 'typeahead-is-active'/*added to an active item in the autosuggest list*/, input: 'typeahead-input', ul: 'typeahead-ul'}
urlUrl to the backend service to provide the resultsnull
minCharsNumber of total chars to type before search is performed2

project

If the project object is passed in, the url will be populated from the project settings

0.10.4

6 years ago

0.9.5

6 years ago

0.9.4

6 years ago

0.9.2

7 years ago

0.9.1

7 years ago

0.9.0

7 years ago

0.8.2

7 years ago

0.8.1

7 years ago

0.7.1

7 years ago

0.7.0

7 years ago

0.6.0

7 years ago

0.5.0

7 years ago

0.4.26

7 years ago

0.4.25

7 years ago

0.4.24

7 years ago

0.4.23

7 years ago

0.4.22

7 years ago

0.4.21

7 years ago

0.4.20

7 years ago

0.4.19

7 years ago

0.4.18

7 years ago

0.4.17

7 years ago

0.4.16

7 years ago

0.4.15

7 years ago

0.4.14

7 years ago

0.4.13

7 years ago

0.4.12

7 years ago

0.4.11

7 years ago

0.4.10

7 years ago

0.4.9

7 years ago

0.4.8

7 years ago

0.4.7

7 years ago

0.4.6

7 years ago

0.4.5

7 years ago

0.4.4

7 years ago

0.4.3

7 years ago

0.4.2

7 years ago

0.4.1

7 years ago

0.4.0

7 years ago

0.3.8

7 years ago

0.3.7

7 years ago

0.3.6

7 years ago

0.3.5

7 years ago

0.3.4

7 years ago

0.3.3

7 years ago

0.3.2

7 years ago

0.3.1

7 years ago

0.3.0

7 years ago

0.2.0

7 years ago

0.1.4

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago