1.0.0 • Published 11 months ago

ng-ws-select-search-ahead v1.0.0

Weekly downloads
-
License
-
Repository
github
Last release
11 months ago

NgWsSelectSearchAhead

This select/multiselect is a powerful and customizable Angular component for creating searchable dropdown selects with advanced features.

Features

  • Single and multi-select options
  • Search functionality with highlighting
  • Customizable styling
  • Loading state support
  • Keyboard navigation (Enter to open, Escape to close)

Installation

npm install ng-ws-select-search-ahead

Usage

  <ng-ws-select-search-ahead
  optionLabel="name"
  [listItems]="items"
  [pending]="pendingState"
  [isDisabled]="disabledState"
  [isMultiple]="true"

  (selectionChange)="onSelectionChange($event)"
  (onToggleAllChange)="onToggleSelectChange($event)"
  (onSearchInputChange)="onSeearchInputChange($event)"
  (onItemClicked)="onClick($event)"
  (onClose)="onClose($event)"
/>

Inputs

InputTypeDefaultDescription
listItemsany[]RequiredArray of items to display in the dropdown
optionLabelstringRequiredProperty name to use as the display label for each item
pendingbooleanfalseShows loading state when true
isDisabledbooleanfalseDisables the component when true
isMultiplebooleanfalseEnables multi-select when true
hideCheckboxesbooleanfalseHides checkboxes when true
placeHolderstring'Select'Placeholder text
loadingLabelstring'Loading'Text to display during loading state
loadingIconstring''URL for custom loading icon
noDataLabelstring'No Items'Text to display when no items match the search
wrapperClassesstring''Additional CSS classes for the wrapper
boxClassesstring''Additional CSS classes for the select box
boxTextClassesstring''Additional CSS classes for the box text
overlayClassesstring''Additional CSS classes for the dropdown overlay
searchWrapperClassesstring''Additional CSS classes for the search wrapper
checkboxClassesstring''Additional CSS classes for checkboxes
searchInputWrapperClassesstring''Additional CSS classes for the search input wrapper
closeBtnClassesstring''Additional CSS classes for the close button
itemClassesstring''Additional CSS classes for list items
loaderClassesstring''Additional CSS classes for the loader
itemLabelClassesstring''Additional CSS classes for item labels
noDataClassesstring''Additional CSS classes for the no data message
noDataTextClassesstring''Additional CSS classes for the no data text

Outputs

OutputTypeDescription
selectionChangeEventEmitter<any | any[]>Emits when the selection changes
onItemClickedEventEmitterEmits when an item is clicked
onToggleAllChangeEventEmitterEmits when the "Select All" checkbox changes
onSearchInputChangeEventEmitterEmits when the search input changes
onCloseEventEmitterEmits when the dropdown closes

Customization

This select/multiselect offers extensive customization options through CSS classes. \ You can pass additional classes to various parts of the component to adjust its appearance to match your application's design.