0.1.5 • Published 2 years ago

chip-selections v0.1.5

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

Chip Selections

Angular component using chips to add selections as a formControl. You can also add multiple entries into the field (comma delimited) and it will parse and add the chips.

Installation

npm install chip-selections

Scaffolding

Import the module into your project under imports

imports: [
    BrowserModule,
    AppRoutingModule,
    ChipSelectionsModule
  ],

Selector Usage

This is the basic selector with no content, header or hiddend content

This selector uses content projection - the following selector can be projected into the component - the element does not matter.

Inputs

The following Inputs are available

InputTypeDefautDescription
placeholderSTRING''placeholder text
labelSTRING''label for input

Outputs

EventTypeDescription
changeSTRINGall chips in input as string - comma delimited

FormControl

formControlName="chips"

<wav-chip-selections formControlName="chips"></wav-chip-selections>

chipSelections = this.fb.group({
  chips: ['sample_1, sample_2, sample_3, sample_4'],
})