Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • LinqMultiSelectComponent

Implements

  • AfterViewInit
  • OnDestroy
  • OnChanges

Index

Constructors

Properties

accessor: LinqMultiSelectAccessor<unknown>

Optional override of the default string indexOf filter

asyncValidators: AsyncValidatorFn[] = []

Optional async validators to run against the selected list

auto: MatAutocomplete

MatAutocomplete Angular Material component

autoTrigger: MatAutocompleteTrigger

MatAutocompleteTrigger Angular Material component

destroy$: Subject<unknown> = ...
disabled: boolean = false

Boolean to disable the search input and chips list

errorMessage: string = ...

Message displayed when any validator fails

filter: LinqMultiSelectFilter<unknown>

Optional override of the default string indexOf filter

filteredData: Observable<unknown[]>

List of mat-options rendered in the menu

flattenedOptions: string[] = []

Options flattened using the accessor method, if provided

flattenedSelected: string[] = []

Selected flattened using the accessor method, if provided

hint: string

Input hint

intl: LinqIntl
label: string

Input label

optionRef: TemplateRef<unknown>

Optional template override for the mat-option content

optionSelected: EventEmitter<any[]> = ...

Event emitted whenever the selection changes, add or remove

options: unknown[]

Preformatted data used for mat-options in the menu

placeholder: string = ...

Search input placeholder text

ready: EventEmitter<LinqMultiSelectReadyEvent> = ...

Event emitted when the component is rendered

searchCtrl: FormControl = ...

FormControl for the search input in the UI

searchInput: ElementRef<any>

Search input element, not FormControl for the UI

searchValue: string

Value entered into the search box, see trackInputChange()

selected: unknown[] = []

Array of selected options rendered as mat-options

trackingCtrl: FormControl = ...

Used to track validation in the selection

validators: ValidatorFn[] = []

Optional validators to run against the selected list

Methods

  • filterOptions(value: string): unknown[]
  • Parameters

    • value: string

    Returns unknown[]

  • handleClearSearch(): void
  • When the search input has a value, a clear icon appears next to the text. Clear the search input value and open the search panel.

    Returns void

  • handleRemove(item: string): void
  • Parameters

    • item: string

    Returns void

  • handleRemoveSelection(event: MatChipSelectionChange): void
  • Triggered when a chip is removed from the chip list. Must deselect the chip or else causes strange bug.

    Parameters

    • event: MatChipSelectionChange

    Returns void

  • handleSelected(event: MatAutocompleteSelectedEvent): void
  • Parameters

    • event: MatAutocompleteSelectedEvent

    Returns void

  • isSelected(item: unknown): boolean
  • Parameters

    • item: unknown

    Returns boolean

  • ngAfterViewInit(): void
  • Returns void

  • ngOnChanges(changes: SimpleChanges): void
  • Parameters

    • changes: SimpleChanges

    Returns void

  • ngOnDestroy(): void
  • Returns void

  • trackInputChange(): void
  • Track the input values for the text input. Autocomplete will clear the input when a value is selected from the menu list. We want to retain the value and keep the current search list. The value is used in handleSelected()

    Returns void

Generated using TypeDoc