Design systém gov.cz4.7.1

gov-form-autocomplete ​

Properties ​

PropertyAttributeDescriptionTypeDefault
disableddisabledMakes the input component disabled. This prevents users from being able to interact with the select, and conveys its inactive state to assistive technologies.booleanfalse
identifieridentifierCustom input identifier.stringundefined
invalidinvalidIndicates the entered value does not conform to the format expected by the application.booleanundefined
maxOptionsmax-optionsMaximum number of items shown from a static options list (0 = unlimited). Applies only when no async search callback is set.number10
maxlengthmaxlengthMaximum length (number of characters) of valuenumberundefined
messageEmptymessage-emptyCustom message for when there is a blank sheetstring'Nebyly nalezeny žádné výsledky'
minlengthminlengthMinimum length (number of characters) of valuenumber3
namenameName of the input.stringundefined
nameKeyname-keyMain key name in the objectstring'name'
optionsoptionsOptions of autocompleteGovFormAutocompleteItem[] | stringundefined
placeholderplaceholderText that appears in the form control when it has no value setstringundefined
readonlyreadonlyThe value is not editablebooleanundefined
requiredrequiredSet whether the input is required or not. Please note that this is necessary for accessible inputs when the user is required to fill them. When using this property you need to also set “novalidate” attribute to your form element to prevent browser from displaying its own validation errors.booleanfalse
sizesizeInput’s size."l" | "m" | "s" | "xl" | "xs"'m'
successsuccessIndicates the entered value of child form element does conform to the format expected by the application.booleanundefined
throttleTimethrottle-timeInput throttle in millisecondsnumber200
valuevalueValue of inputstring''

Events ​

EventDescriptionType
gov-blurEmitted when the input loses focus.CustomEvent<FormAutocompleteEvent>
gov-focusEmitted when the input has focus.CustomEvent<FormAutocompleteEvent>
gov-inputEmitted when the input change value.CustomEvent<FormAutocompleteEvent>
gov-selectEmitted when the input change value.CustomEvent<FormAutocompleteEvent>

Methods ​

clearValue() => Promise<void> ​

Clears whisperer value

Returns ​

Type: Promise<void>

setBlur() => Promise<void> ​

Blur main input element

Returns ​

Type: Promise<void>

setFocus(options?: FocusOptions) => Promise<void> ​

Focus main input element

Parameters ​

NameTypeDescription
optionsFocusOptions

Returns ​

Type: Promise<void>

setOptions(options: GovFormAutocompleteItem[]) => Promise<void> ​

Set options for list

Parameters ​

NameTypeDescription
optionsGovFormAutocompleteItem[]

Returns ​

Type: Promise<void>

setProcessing(status: boolean) => Promise<void> ​

Clears whisperer value

Parameters ​

NameTypeDescription
statusboolean

Returns ​

Type: Promise<void>

setSearchCallback(callback: (value: string) => Promise<any>) => Promise<void> ​

Set a custom asynchronous function for the whisperer

Parameters ​

NameTypeDescription
callback(value: string) => Promise<any>

Returns ​

Type: Promise<void>

setTemplateResolver(callback: (item: GovFormAutocompleteItem) => string) => Promise<void> ​

Setting a custom whisper result template

Parameters ​

NameTypeDescription
callback(item: GovFormAutocompleteItem) => string

Returns ​

Type: Promise<void>

Dependencies ​

Used by ​

Depends on ​

Graph ​


Built with StencilJS