EAutocomplete Autocomplete
Examples
Autocomplete
Custom suggestions, loading and keyboard navigation
Input suggestions
Properties
accessibleNamestringName read by assistive technologies; provide a readable name for controls without text.
placeholderTextappendComponentComponentComponent slot for custom input append area or list end; null uses the default content. See this page’s examples for delegate context.
nullclearIconintIcon used by the component.
EIcons.*
0 (no icon)
EIcons.CIRCLE_XMARKclearableboolShow a clear action; ratings may be cleared by clicking the current score again.
falsedebounceintDelay, throttling or automatic close time in milliseconds; 0 means no delay or no timed close.
300echoModeenumDisplay mode for the input text.
TextInput.NormalTextInput.PasswordTextInput.NoEchoTextInput.PasswordEchoOnEdit
Dynamic bindingenabledboolAllow interaction; false disables the control.
truefetchSuggestionsvarSuggestion callback (query, callback); call callback or return an array or Promise.
nullfitInputWidthboolMatch the suggestion popup width to the input.
truefontfontFont settings for the family, size and text style.
Common fields:
family, pixelSize, pointSize
bold, italic, weight
underline, strikeout
letterSpacing, wordSpacing
application fontformattervarFormatting callback converting a value to displayed text.
nullheaderDelegateComponentComponent slot for custom header; null uses the default content. See this page’s examples for delegate context.
nullheightrealComponent size in pixels; may be bound to its parent layout.
implicitHeighthideLoadingboolHide the loading indicator in suggestions.
falsehighlightFirstItemboolHighlight the first suggestion when the list opens.
falseloadingboolWhether the component is loading.
falseloadingDelegateComponentComponent slot for custom loading state; null uses the default content. See this page’s examples for delegate context.
nullmaximumLengthintMaximum allowed input characters.
32767modelvarComponent data source; item structure follows the current example and component contract.
[]offsetintOffset relative to layout, scroll target or popup reference, in pixels.
6optionDelegateComponentComponent slot for custom option; null uses the default content. See this page’s examples for delegate context.
nullparservarInput parser converting displayed text to the underlying value.
nullpasswordVisibleboolDisplay the password as plain text.
falseplaceholderTextstringPlaceholder shown when the value is empty.
""placementstringSuggestion list position relative to the input.
"top" / "top-start""top-end" / "bottom""bottom-start" / "bottom-end"
"bottom-start"popupMaxHeightintMaximum suggestion popup height in pixels.
240popupWidthintPopup or menu width in pixels; 0 selects automatic width.
0prefixComponentComponentComponent slot for custom prefix; null uses the default content. See this page’s examples for delegate context.
nullprefixIconintIcon used by the component.
EIcons.*
0 (no icon)
0prependComponentComponentComponent slot for custom input prepend area; null uses the default content. See this page’s examples for delegate context.
nullreadOnlyboolPrevent user editing or rating while allowing programmatic value changes.
falseselectWhenUnmatchedboolAllow submitting entered text when no suggestion matches.
falseshowArrowboolShow the popup or tour arrow.
falseshowPasswordboolEnable password entry and visibility switching.
falseshowWordLimitboolShow the current character count and length limit.
falsesizeintControl size; inherits the nearest EConfigProvider by default.
EStyle.SmallEStyle.MediumEStyle.Large
Inherited; EStyle.Medium by defaultstyleTypeintSemantic color style.
EStyle.DefaultEStyle.PrimaryEStyle.SuccessEStyle.InfoEStyle.WarningEStyle.Danger
EStyle.PrimarysuffixComponentComponentComponent slot for custom suffix; null uses the default content. See this page’s examples for delegate context.
nullsuffixIconintIcon used by the component.
EIcons.*
0 (no icon)
0textstringDisplayed text.
""textColorcolorText color.
Dynamic bindingtextRolestringObject field used for text, values, child nodes or indentation.
"label"triggerOnFocusboolQuery and display suggestions when the input gains focus.
truevalidateEventboolRequest enclosing-form validation when the value changes.
truevalidationMessagestringValidation message or externally supplied error text.
""validationStateintInput validation state.
EValidationState.NoneEValidationState.SuccessEValidationState.WarningEValidationState.Error
EValidationState.NonevalueKeyaliasOption value field or unique identifier for object values.
Alias: control.textRolevisibleboolWhether the component is visible.
truewidthrealComponent size in pixels; may be bound to its parent layout.
implicitWidthactivatedboolRead onlyWhether the autocomplete popup is activated.
Computed at runtimehasValidationErrorboolRead onlyWhether validation state is Error.
Computed at runtimehighlightedIndexintRead onlyKeyboard-highlighted suggestion index.
Computed at runtimeinputRefvarRead onlyInternal input reference for inspecting input state or managing focus.
Computed at runtimepopperRefvarRead onlyReference to the internal menu, popup or tooltip.
Computed at runtimesourceItemsvarRead onlyNormalized suggestion or selection options.
Computed at runtimesuggestionsvarRead onlyItems returned by the current suggestion query.
Computed at runtimewordCountintRead onlyCurrent input character count.
Computed at runtimeshowPasswordStrengthboolShow strength and rule checks while a password input is focused.
falsepasswordRulesvarPassword rules with label and minLength or pattern.
Show default value
[ {label: ELocale.texts.PasswordLength, minLength: 8}, {label: ELocale.texts.PasswordUppercase, pattern: /[A-Z]/}, {label: ELocale.texts.PasswordLowercase, pattern: /[a-z]/}, {label: ELocale.texts.PasswordNumber, pattern: /[0-9]/}, {label: ELocale.texts.PasswordSymbol, pattern: /[^A-Za-z0-9]/} ]passwordStrengthrealRead onlyFraction of passed password rules, from 0 to 1.
Show default value
passwordRequirements.length ? passwordRequirements.filter(function(rule) { return rule.passed }).length / passwordRequirements.length : 0passwordRequirementsvarRead onlyRule results with label and passed fields.
Show default value
Array.isArray(passwordRules) ? passwordRules.map(function(rule) { let passed = false try { if (rule && rule.minLength !== undefined) passed = text.length >= Number(rule.minLength) else if (rule && rule.pattern) { const expression = new RegExp(rule.pattern) passed = expression.test(text) } } catch (error) { passed = false } return {label: rule && rule.label ? String(rule.label) : "", passed: passed} }) : []Signals
cleared()Emitted after the contents are cleared with the clear action.
formatFailed(string message)Emitted when input formatting fails; message explains why.
selected(var value)Emitted when a suggestion is selected; value is the selected suggestion value.
searchFailed(string message)Emitted when fetching suggestions fails; message explains why.
Methods
blur()Remove focus from the input.
close()Close the component panel or popup.
open()Open the component panel or popup.
getData(query)Request autocomplete suggestions using query.
choose(index)Choose the suggestion at index.
highlight(index)Highlight the suggestion at index.
fetch(query)Fetch autocomplete suggestions using query.