alfresco-ng2-components/docs/content-services/components/search-chip-autocomplete-input.component.md
AleksanderSklorz d70f689e06
[ACS-5183] properties facet file size and file type (#8766)
* ACS-5183 Created component which displays form to search nodes by file type and size

* ACS-5183 Validate proper value in number input and allow to use custom file types

* ACS-5183 Corrected problem with styles, case insensitive compare for extensions

* ACS-5183 Added translations, styles for selecting type, proper comparator for types

* ACS-5183 Prevent adding custom file type when selecting existing one

* ACS-5183 Corrected bytes for each file size unit and clear number input when value is incorrect

* ACS-5183 Added documentation for search properties component, updated documentation for search chip autocomplete input and taking values from settings

* ACS-5183 Unit tests

* ACS-5183 Added automation ids

* ACS-5183 Added missing license header

* ACS-5183 Fixed lint issues

* ACS-5183 Fixed build issue
2023-07-18 15:45:00 +02:00

3.3 KiB

Title, Added, Status, Last reviewed
Title Added Status Last reviewed
Search Chip Autocomplete Input component v6.1.0 Active 2023-06-13

Search Chip Autocomplete Input component

Represents an input with autocomplete options.

Search Chip Autocomplete Input

Basic usage

<adf-search-chip-autocomplete-input
    [autocompleteOptions]="allOptions"
    [onReset$]="onResetObservable$"
    [allowOnlyPredefinedValues]="allowOnlyPredefinedValues"
    (optionsChanged)="onOptionsChange($event)">
</adf-search-chip-autocomplete-input>

Properties

Name Type Default value Description
autocompleteOptions string[] [] Options for autocomplete
onReset$ Observable<void> Observable that will listen to any reset event causing component to clear the chips and input
allowOnlyPredefinedValues boolean true A flag that indicates whether it is possible to add a value not from the predefined ones
placeholder string 'SEARCH.FILTER.ACTIONS.ADD_OPTION' Placeholder which should be displayed in input.
compareOption (option1: string, option2: string) => boolean Function which is used to selected options with all options so it allows to detect which options are already selected.
formatChipValue (option: string) => string Function which is used to format custom typed options.
filter (options: string[], value: string) => string[] Function which is used to filter out possibile options from hint. By default it checks if option includes typed value and is case insensitive.

Events

Name Type Description
optionsChanged EventEmitter<string[]> Emitted when the selected options are changed

See also