Converse converse.js

Class: AutoCompleteComponent

AutoCompleteComponent()

new AutoCompleteComponent()

A custom element that can be used to add auto-completion suggestions to a form input.

Properties:
Name Type Attributes Default Description
position "above" | "below" <optional>
"above"

Should the autocomplete list show above or below the input element?

autofocus Boolean <optional>
false

Should the focus attribute be set on the input element?

getAutoCompleteList function

A function that returns the list of autocomplete suggestions

list Array

An array of suggestions, to be used instead of the getAutoCompleteList * function

auto_evaluate Boolean <optional>
true

Should evaluation happen automatically without any particular key as trigger?

auto_first Boolean <optional>
false

Should the first element automatically be selected?

filter "contains" | "startswith" <optional>
"contains"

Provide matches which contain the entered text, or which starts with the entered text

include_triggers String <optional>
""

Space separated characters which should be included in the returned value

min_chars Number <optional>
1

The minimum number of characters to be entered into the input before autocomplete starts.

name String <optional>

The name attribute of the input element

placeholder String <optional>

The placeholder attribute of the input element

triggers String <optional>

String of space separated characters which trigger autocomplete

Source:
Example
<converse-autocomplete
        .getAutoCompleteList="${getAutoCompleteList}"
        placeholder="${placeholder_text}"
        name="foo">
    </converse-autocomplete>