Skip to content
angulux
@anguless/angulux/multiselect

multiselect

2 declarations3 demos
import
import { MultiSelectModule } from '@anguless/angulux/multiselect';

Basic

MultiSelect binds to an array and summarises the selection in its label.

Select cities
<agl-multiSelect [(ngModel)]="selected" [options]="cities" optionLabel="name" placeholder="Select cities" />

Chips

Chip display shows each selected item as its own removable chip.

Select cities
<agl-multiSelect [(ngModel)]="selected" [options]="cities" optionLabel="name" display="chip" placeholder="Select cities" />

Filter

Filtering searches the properties named by filterBy.

Select cities
<agl-multiSelect [(ngModel)]="selected" [options]="cities" [filter]="true" filterBy="name" optionLabel="name" placeholder="Select cities" />

API

Generated from the committed corpus, which check:corpus holds to the built library.

MultiSelectItem

componentli[aglMultiSelectItem]
InputTypeDefaultDescription
optionanynot documented
selectedboolean | undefinednot documented
labelstring | undefinednot documented
disabledboolean | undefinednot documented
itemSizenumber | undefinednot documented
focusedboolean | undefinednot documented
ariaPosInsetstring | undefinednot documented
ariaSetSizestring | undefinednot documented
variant'outlined' | 'filled'not documented
templateTemplateRef<MultiSelectItemTemplateContext> | undefinednot documented
checkIconTemplateTemplateRef<MultiSelectItemCheckboxIconTemplateContext> | undefinednot documented
itemCheckboxIconTemplateTemplateRef<MultiSelectItemCheckboxIconTemplateContext> | undefinednot documented
highlightOnSelectboolean | undefinednot documented
OutputTypeDescription
onClickEventEmitter<any>
onMouseEnterEventEmitter<any>

Inherited from BaseComponent

inherited
InputTypeDefaultDescription
dtObject | undefined undefined Defines scoped design tokens of the component.
unstyledboolean | undefined undefined Indicates whether the component should be rendered without styles.
ptPT | undefined undefined Used to pass attributes to DOM elements inside the component. TRUSTED INPUT ONLY. Whatever you put here is applied to the DOM as given: keys become attributes, and a key that names a DOM property is assigned to that property directly, with no sanitizer in between. That is what makes the API useful, and it means a value reaching it from a user, a database or a CMS can execute script. Treat it like markup you wrote yourself, not like data you received.
ptOptionsPassThroughOptions | undefined undefined Used to configure passthrough(pt) options of the component.

MultiSelect

componentagl-multiSelect, agl-multiselect, agl-multi-select

MultiSelect is used to select multiple items from a collection.

InputTypeDefaultDescription
idstring | undefinednot documentedUnique identifier of the component
ariaLabelstring | undefinednot documentedDefines a string that labels the input for accessibility.
styleClass
deprecated — since v20.0.0, use `class` instead.
string | undefinednot documentedStyle class of the element.
panelStyleanynot documentedInline style of the overlay panel.
panelStyleClassstring | undefinednot documentedStyle class of the overlay panel element.
inputIdstring | undefinednot documentedIdentifier of the focus input to match a label defined for the component.
readonlyboolean | undefinednot documentedWhen present, it specifies that the component cannot be edited.
groupboolean | undefinednot documentedWhether to display options as grouped when nested options are provided.
filterbooleannot documentedWhen specified, displays an input field to filter the items on keyup.
filterPlaceHolderstring | undefinednot documentedDefines placeholder of the filter input.
filterLocalestring | undefinednot documentedLocale to use in filtering. The default locale is the host environment's current locale.
overlayVisibleboolean | undefinednot documentedSpecifies the visibility of the options panel.
tabindexnumber | undefinednot documentedIndex of the element in tabbing order.
dataKeystring | undefinednot documentedA property to uniquely identify a value in options.
ariaLabelledBystring | undefinednot documentedEstablishes relationships between the component and label(s) where its value should be one or more element IDs.
displaySelectedLabel true Whether to show labels of selected item labels or use default label.
maxSelectedLabels 3 Decides how many selected item labels to show at most.
selectionLimitnumber | undefinednot documentedMaximum number of selectable items.
selectedItemsLabelstring | undefinednot documentedLabel to display after exceeding max selected labels e.g. ({0} items selected), defaults "ellipsis" keyword to indicate a text-overflow.
showToggleAllbooleannot documentedWhether to show the checkbox at header to toggle all items at once.
emptyFilterMessagestringnot documentedText to display when filtering does not return any results.
emptyMessagestringnot documentedText to display when there is no data. Defaults to global value in i18n translation configuration.
resetFilterOnHidebooleannot documentedClears the filter value when hiding the dropdown.
dropdownIconstring | undefinednot documentedIcon class of the dropdown icon.
chipIconstring | undefinednot documentedIcon class of the chip icon.
optionLabelstring | undefinednot documentedName of the label field of an option.
optionValuestring | undefinednot documentedName of the value field of an option.
optionDisabledstring | undefinednot documentedName of the disabled field of an option.
optionGroupLabelstring | undefinednot documentedName of the label field of an option group.
optionGroupChildrenstringnot documentedName of the options field of an option group.
showHeaderbooleannot documentedWhether to show the header.
filterBystring | undefinednot documentedWhen filtering is enabled, filterBy decides which field or fields (comma separated) to search against.
scrollHeightstringnot documentedHeight of the viewport in pixels, a scrollbar is defined if height of list exceeds this value.
lazybooleannot documentedDefines if data is loaded and interacted with in lazy manner.
virtualScrollboolean | undefinednot documentedWhether the data should be loaded on demand during scroll.
loadingboolean | undefinednot documentedWhether the multiselect is in loading state.
virtualScrollItemSizenumber | undefinednot documentedHeight of an item in the list for VirtualScrolling.
loadingIconstring | undefinednot documentedIcon to display in loading state.
virtualScrollOptionsScrollerOptions | undefinednot documentedWhether to use the scroller feature. The properties of scroller component can be used like an object in it.
overlayOptionsOverlayOptions | undefinednot documentedWhether to use overlay API feature. The properties of overlay API can be used like an object in it.
ariaFilterLabelstring | undefinednot documentedDefines a string that labels the filter input.
filterMatchMode'contains' | 'startsWith' | 'endsWith' | 'equals' | 'notEquals' | 'in' | 'lt' | 'lte' | 'gt' | 'gte'not documentedDefines how the items are filtered.
tooltipstringnot documentedAdvisory information to display in a tooltip on hover.
tooltipPosition'top' | 'left' | 'right' | 'bottom'not documentedPosition of the tooltip.
tooltipPositionStylestringnot documentedType of CSS position.
tooltipStyleClassstring | undefinednot documentedStyle class of the tooltip.
autofocusFilterbooleannot documentedApplies focus to the filter element when the overlay is shown.
displaystring | 'comma' | 'chip'not documentedDefines how the selected items are displayed.
autocompletestringnot documentedDefines the autocomplete is active.
showClearbooleannot documentedWhen enabled, a clear icon is displayed to clear the value.
autofocusboolean | undefinednot documentedWhen present, it specifies that the component should automatically get focus on load.
placeholdernot documentedLabel to display when there are no selections.
optionsany[] | undefinednot documentedAn array of objects to display as the available options.
filterValuestring | undefined | nullnot documentedWhen specified, filter displays with this value.
selectAllboolean | undefined | nullnot documentedWhether all data is selected.
focusOnHoverbooleannot documentedIndicates whether to focus on options when hovering over them, defaults to optionLabel.
filterFieldsany[] | undefinednot documentedFields used when filtering the options, defaults to optionLabel.
selectOnFocusbooleannot documentedDetermines if the option will be selected on focus.
autoOptionFocusbooleannot documentedWhether to focus on the first visible or selected element when the overlay panel is shown.
highlightOnSelectbooleannot documentedWhether the selected option will be add highlight class.
size'large' | 'small' | undefined undefined Specifies the size of the component.
variant'filled' | 'outlined' | undefined undefined Specifies the input variant of the component.
fluid undefined Spans 100% width of the container when enabled.
appendToHTMLElement | ElementRef | TemplateRef<any> | 'self' | 'body' | null | undefined | any 'self' Target element to attach the overlay, valid values are "body" or a local ng-template variable of another element (note: use binding with brackets for template variables, e.g. [appendTo]="mydiv" for a div element having #mydiv as variable name).
motionOptionsMotionOptions | undefinednot documentedThe motion options.
OutputTypeDescription
onChangeEventEmitter<MultiSelectChangeEvent>Callback to invoke when value changes.
onFilterEventEmitter<MultiSelectFilterEvent>Callback to invoke when data is filtered.
onFocusEventEmitter<MultiSelectFocusEvent>Callback to invoke when multiselect receives focus.
onBlurEventEmitter<MultiSelectBlurEvent>Callback to invoke when multiselect loses focus.
onClickEventEmitter<Event>Callback to invoke when component is clicked.
onClearEventEmitter<void>Callback to invoke when input field is cleared.
onPanelShowEventEmitter<AnimationEvent>Callback to invoke when overlay panel becomes visible.
onPanelHideEventEmitter<AnimationEvent>Callback to invoke when overlay panel becomes hidden.
onLazyLoadEventEmitter<MultiSelectLazyLoadEvent>Callback to invoke in lazy mode to load new data.
onRemoveEventEmitter<MultiSelectRemoveEvent>Callback to invoke in lazy mode to load new data.
onSelectAllChangeEventEmitter<MultiSelectSelectAllChangeEvent>Callback to invoke when all data is selected.
Template slotDescription
<ng-template #item>Custom item template.
<ng-template #group>Custom group template.
<ng-template #loader>Custom loader template.
<ng-template #header>Custom header template.
<ng-template #filter>Custom filter template.
<ng-template #footer>Custom footer template.
<ng-template #emptyfilter>Custom empty filter template.
<ng-template #empty>Custom empty template.
<ng-template #selecteditems>Custom selected items template.
<ng-template #loadingicon>Custom loading icon template.
<ng-template #filtericon>Custom filter icon template.
<ng-template #removetokenicon>Custom remove token icon template.
<ng-template #chipicon>Custom chip icon template.
<ng-template #clearicon>Custom clear icon template.
<ng-template #dropdownicon>Custom dropdown icon template.
<ng-template #itemcheckboxicon>Custom item checkbox icon template.
<ng-template #headercheckboxicon>Custom header checkbox icon template.

Inherited from BaseEditableHolder

inherited
InputTypeDefaultDescription
required false There must be a value (if set). Left unbound, a control bound through `formControlName`, `[formControl]` or `ngModel` is required when that control carries `Validators.required` or `Validators.requiredTrue`.
invalid false When present, it specifies that the component should have invalid state style. Left unbound, a control bound through `formControlName`, `[formControl]` or `ngModel` shows the state of that control once it is touched or dirty.
touchedboolean | undefined undefined Whether the user has visited the control. Once this or `dirty` is set, the invalid state style waits for interaction: it appears when the control is touched or dirty. Signal Forms' `[formField]` sets both, so an untouched required field is not shown as invalid. Leave both unset and `invalid` alone decides.
dirtyboolean | undefined undefined Whether the user has changed the value. See `touched`.
disabled false When present, it specifies that the component should have disabled state style.
namestring | undefined undefined When present, it specifies that the name of the input.

Inherited from BaseComponent

inherited
InputTypeDefaultDescription
dtObject | undefined undefined Defines scoped design tokens of the component.
unstyledboolean | undefined undefined Indicates whether the component should be rendered without styles.
ptPT | undefined undefined Used to pass attributes to DOM elements inside the component. TRUSTED INPUT ONLY. Whatever you put here is applied to the DOM as given: keys become attributes, and a key that names a DOM property is assigned to that property directly, with no sanitizer in between. That is what makes the API useful, and it means a value reaching it from a user, a database or a CMS can execute script. Treat it like markup you wrote yourself, not like data you received.
ptOptionsPassThroughOptions | undefined undefined Used to configure passthrough(pt) options of the component.