Other options
The rest of options:
-
min_chars: the minimum number of characters to trigger suggestions.
-
debounce: the debounce time in milliseconds for fetching suggestions from remote source.
-
separator: the separator for multiple values, default is comma.
-
id_key: the key to use for the value of the option.
-
label_key: the key to use for the label of the option.
{%- call ui.util.call(show_example) -%}
{%- raw %}
{%- set url = h.url_for("api.dataset_autocomplete", incomplete="?") -%}
{{ ui.autocomplete(label="Dataset titles", label_key="title", source=url, id_key="name") }}
{{ ui.autocomplete(label="Debounce 5s", debounce=5000, source=url, id_key="name") }}
{{ ui.autocomplete(label="5 characters for completion", min_chars=5, source=url, id_key="name") }}
{%- endraw %}
{%- endcall %}