awesomplete-util

1.0.7 • Public • Published

npm

AwesompleteUtil

Javascript library by nico-amsterdam as npm module that utilizes Lea Verou's autocomplete / autosuggest / typeahead / inputsearch Awesomplete widget. It adds the following features:

  • Dynamic remote data loading; based on what is typed-in it performs an ajax lookup.
  • Allow HTML markup in the shown items. Show value with description. Optionally search in the description text.
  • Show when there is an exact match.
  • Show when a list is loading from a remote source.
  • Show when there isn't a match.
  • When there is an exact match show related data (supplied in the remote data) in other parts of the page.
  • Select the highlighted item when tab key is used.

Install

$ yarn add awesomplete-util # Or alternatively: `npm i awesomplete-util` 

Usage

import AwesompleteUtil from 'awesomplete-util'

Examples and documentation

live examples with code.

The CSS class 'awe-loading' is put on the input control when there is an ongoing XHR request.

Generate minified version with sourcemap

Copy index.js and make your desired changes. Install the Node package manager and the uglify-js node module. Adjust the paths in mini.sh and run this shell script to generated the minified version of AwesompleteUtil and the sourcemap.

License

MIT

Package Sidebar

Install

npm i awesomplete-util

Weekly Downloads

101

Version

1.0.7

License

MIT

Unpacked Size

32 kB

Total Files

5

Last publish

Collaborators

  • pascalmayr