0.0.1 • Published 5 years ago

ng-select-list v0.0.1

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

Angular ng2-select-list. Quick, simple and understandable

Live Demo

Features

  • Custom binding to property
  • A bridge between the Angular forms API and a native element in the DOM
  • Multiselect checkbox using material theme
  • Flexible autocomplete
  • Custom search

Installation

Install ng2-select-list

  npm install --save ng-select-list

Import Ng2SelectListModule and FormsModule modules:

  import { Ng2SelectListModule } from '@ng-select/ng-select';
  import { FormsModule } from '@angular/forms';
  
  @NgModule({
    declarations: [AppComponent],
    imports: [Ng2SelectListModule, FormsModule],
    bootstrap: [AppComponent]
  })
  export class AppModule {}

API

Inputs

InputTypeDefaultDescription
optionsArray[]Items array.
multipleBooleanfalseAllows to select multiple items.
placeholderStringChoose itemPlaceholder text.
disabledBooleanfalseAllows select list disable.
isFilterOptionbooleanfalseAllow to search for value.
isAllSelectbooelanfalseAllows all option checked.
filterPlaceholderStringSearch...Search placeholder text.
noResultMessageStringNo result!Set custom text if items array empty.

Outputs

OutputDescription
selectedIt works when selected an item. It returns item's value.
filterInputChangedIt works when typed into search input. It returns user's search text as string.
focusIt works on select focus.
blurIt works on select blur.

Inspiration

This component is inspired by ng-select. Check their amazing work and components. :)