0.0.4 • Published 3 years ago

fbro-multiselect v0.0.4

Weekly downloads
17
License
-
Repository
github
Last release
3 years ago

fbro-multiselect

This library was generated with Angular CLI version 9.0.7.

Installation

npm i fbro-multiselect

Usage

import {MultiselectModule} from "fbro-multiselect";

@NgModule({
    ...
    imports: [BrowserModule, MultiselectModule]
    ...
})
class MainModule { }
<multiselect
  [options]="options"
  [filter]="true"
  filterBy="label"
  optionLabel="label"
  optionValue="value"
  (onChange)="selectedValues($event)"></multiselect>
</select2>

properties and events

nametypedefaultdescriptionexample
options{}[] array of objects[]Options on the dropdownoptions: {}[] = [{label:'option1', value:'one'}, ...]
filterbooleanfalseEnable search options[filter]="true"
filterBystringlabelObject properties for search. add more properties seperated by comma (,)filterBy="label,value,customProp"
optionLabelstringlabeltext to show at dropdown optionoptionLabel="customProp"
optionValuestringvaluevalue of the given labeloptionValue="customPropVal"
onChangemethodemmit event on change when add/remove value(onChange)="printTheChange($event)"

Features

  • close dropdown on press Escape(Esc) key
  • close dropdown on outclick
  • move/highlight option by using up and down keys
  • press space key to select/deselect the highlighted option
0.0.4

3 years ago

0.0.3

3 years ago

0.0.0

3 years ago