AutoComplete
value type: string
The AutoComplete block is a text input that has a list of suggestions for the user. These suggestions are filtered as the user fills in the input. The user is also allowed to fill in an input not part of that list.
If you need the user to select only from a list of options, use a block like the
Selector
block instead.
Block
Type or select item
State
block_id: null
Block Setup
id: block_id
type: AutoComplete
Settings
AutoComplete JSON Schema Definition
type: object
properties:
events:
additionalProperties: false
properties:
onChange:
description: Trigger actions when selection is changed.
type: array
type: object
properties:
additionalProperties: false
properties:
allowClear:
default: true
description: Allow the user to clear the selected value, sets the value to null.
type: boolean
autoFocus:
default: false
description: Autofocus to the block on page load.
type: boolean
backfill:
default: false
description: Backfill selected item the input when using keyboard
type: boolean
defaultOpen:
default: false
description: Initial open state of dropdown.
type: boolean
disabled:
default: false
description: Disable the block if true.
type: boolean
inputStyle:
description: Css style to applied to input.
type: object
label:
additionalProperties: false
description: Label properties.
properties:
align:
default: left
description: Align label left or right when inline.
enum:
- left
- right
type: string
colon:
default: true
description: Append label with colon.
type: boolean
disabled:
description: Hide input label.
type: boolean
extra:
description: Extra text to display beneath the content.
type: string
extraStyle:
description: Css style to applied to label extra.
type: object
feedbackStyle:
description: Css style to applied to label feedback.
type: object
hasFeedback:
default: true
description: >-
Display feedback extra from validation, this does not disable
validation.
type: boolean
inline:
default: false
description: Render input and label inline.
type: boolean
span:
description: Label inline span.
type: number
title:
description: Label title.
type: string
type: object
options:
default: []
oneOf:
- description: >-
Options can either be an array of string values, on an array of
label, value pairs - supports html.
items:
type: string
type: array
- description: >-
Options can either be an array of string values, on an array of
label, value pairs.
items:
properties:
disabled:
default: false
description: Disable the option if true.
type: boolean
filterString:
description: >-
String to match against when filtering selector options
during. If no filterString is provided the filter method
matches against options.label.
type: string
label:
description: Value label shown to user - supports html.
type: string
style:
description: Css style to applied to option.
type: object
value:
description: Value selected. Can be of any type.
type: string
required:
- value
type: object
type: array
optionsStyle:
description: Css style to applied to option elements.
type: object
placeholder:
default: Type or select item
description: Placeholder text inside the block before user selects input.
type: string
size:
default: default
description: Size of the block.
enum:
- small
- default
- large
type: string
title:
description: >-
Title to describe the input component, if no title is specified the
block id is displayed.
type: string
type: object