Simple autocomplete pure vanilla Javascript library.
Important Note:This release has several breaking changes, so kindly check all the below changes.
DIV
readyState
listener that initializes the library after DOM
content is loadedquery
value to data.src
for easier data fetchingresultsList
navigation auto scrolling for long listsresultsList.tabSelect
API property to control tab
button behaviorevents
list API property that holds and assigns events to input
& list
(Thanks 👍 @stell) #223close
API method controls resultsList
stateopen
API method controls resultsList
stategoTo
API method controls resultsList
navigation by indexnext
API method controls resultsList
navigationprevious
API method controls resultsList
navigationselect
API method controls resultsList
selection by indexsearch
API method to avail autoComplete.js powerful engine for external useisOpen
API boolean
property that holds resultsList
state true
opened false
closedlist
API property holds the entire list html elementwrapper
API property holds the entire wrapper html elementcursor
API property holds the index of the current selection or -1
or undefined
for idleid
API property holds the current instance numbername
API property that changes all the className
properties accordinglyoptions
API property that holds all the custom set config
options for separationdata.src
fetching error message/instance to response
event detail (Thanks 👍 @folknor) #207WAI-ARIA
configurations for significantly better supportdataFeedback
event informationdiacritics
highlighting issue in strict
moderesultsList
eventEmitters unexpected behavior which was firing multiple timesclassName
values do not assign any classes instead of undefined
undefined
valuefetch
eventEmitter name to response
inputField
API property name to input
dataFeedback
API property name to feedback
trigger
API property type from Object
to Function
formerly called trigger.condition
data.results
API property name to data.filter
noResults
API to accept boolean
instead of Function
to be replaced with resultsList.container
resultItem.highlight
API property type from Object
to accept Boolean
or String
formerly called resultItem.highlight.class
resultItem.selected
API property type from Object
to String
formerly called resultItem.selected.class
resultItem.content
API parameters order from (data, element)
to (element, data)
for consistencyresultItem.idName
API property name to resultItem.id
resultItem.className
API property name to resultItem.class
resultItem.content
API property name to resultItem.element
resultsList.idName
API property name resultsList.id
resultsList.className
API property name resultsList.class
resultsList.container
API property name to resultsList.element
mark
instead of span
(Thanks 👍 @aarongerig) #195query
API property type from Object
to Function
formerly called query.manipulate
observer
API property name observe
data.key
API property name data.keys
onSelection
API method to be replaced with selection
eventEmitterresultsList.render
API property to be replaced with resultsList
to accept Boolean
instead of Object
in case of disabling list renderingtrigger.event
API property to be replaced with events
feedback
API method to be replaced with navigate
eventresultsList.navigation
API method to be replaced with events
nav
API property to be replaced with events
hook
API method to be replaced with start
APIonSelection
API method to be replaced with selection
eventEmitterinput
property from feedback
due to the existence of query
alreadyunInit
eventEmitter! Important Note:
Starting next major release:
- "noResults" API will accept "Boolean" instead of function to be replaced with "resultsList.container"
- "fetch" eventEmitter will be renamed to "response"
- All "className" APIs will be renamed to "classList"
inputField
value was in lowerCase instead of rawresultItem.className
did not accept except one class instead of multiple