Displays a input text that supports autocompletion

Text Widget

Basic Usage

<adf-search-text-input
    [expandable]="true"
    [autocomplete]="autocomplete"
    [liveSearchEnabled]="liveSearchEnabled"
    (searchChange)="onSearchChanged($event)">
</adf-search-text-input>

Class members

Properties

NameTypeDefault valueDescription
autocompletebooleanfalseToggles auto-completion of the search input field.
collapseOnBlurbooleantrueToggles whether to collapse the search on blur.
collapseOnSubmitbooleantrueCollapse search bar on submit.
debounceTimenumber0Debounce time in milliseconds.
defaultStateSearchTextStateEnumDefault state expanded or Collapsed.
expandablebooleantrueToggles whether to use an expanding search control. If false then a regular input is used.
focusListenerObservable<FocusEvent>Listener for results-list events (focus, blur and focusout).
hintLabelstring""Hint label
inputTypestring"text"Type of the input field to render, e.g. "search" or "text" (default).
liveSearchEnabledbooleantrueToggles "find-as-you-type" suggestions for possible matches.
placeholderstring""Placeholder text to show in the input field
searchAutocompleteanyfalseTrigger autocomplete results on input change.
searchTermstring""Search term preselected
showClearButtonbooleanfalseToggles whether to show a clear button that closes the search

Events

NameTypeDescription
resetEventEmitter<boolean>Emitted when the result list is reset
searchChangeEventEmitter<string>Emitted when the search term is changed. The search term is provided in the 'value' property of the returned object. If the term is less than three characters in length then it is truncated to an empty string.
searchVisibilityEventEmitter<boolean>Emitted when the search visibility changes. True when the search is active, false when it is inactive
selectResultEventEmitter<any>Emitted when the result list is selected
submitEventEmitter<any>Emitted when the search is submitted by pressing the ENTER key. The search term is provided as the value of the event.

© 2023 Alfresco Software, Inc. All Rights Reserved.