0.9.1 • Published 7 years ago

@covalent/chips v0.9.1

Weekly downloads
-
License
MIT
Repository
github
Last release
7 years ago

td-chips

td-chips element generates a list of strings as chips.

Add the items attribute to enable the autocomplete with a search list, and requireMatch to validated the input against the provided search list.

API Summary

Properties:

NameTypeDescription
items?string[]Enables Autocompletion with the provided list of search strings.
readOnlybooleanDisables the chip input and removal.
requireMatch?booleanValidates input against the provided search list before adding it to the model. If it doesnt exist, it cancels the event.
placeholder?stringPlaceholder for the autocomplete input.
add?functionMethod to be executed when string is added as chip through the autocomplete. Sends chip value as event.
remove?functionMethod to be executed when string is removed as chip with the "remove" button. Sends chip value as event.

Setup

Import the CovalentChipsModule using the forRoot() method in your NgModule:

import { CovalentChipsModule } from '@covalent/chips';
@NgModule({
  imports: [
    CovalentChipsModule.forRoot(),
    ...
  ],
  ...
})
export class MyModule {}

Usage

Example for HTML usage:

<td-chips placeholder="placeholder" [items]="items" [(ngModel)]="model" [readOnly]="readOnly" (add)="addEvent($event)" (remove)="removeEvent($event)" requireMatch>
</td-chips>  
0.9.1

7 years ago

0.9.0

7 years ago

0.8.1

8 years ago

0.8.0

8 years ago

0.7.0

8 years ago

0.6.0-exp1

8 years ago

0.6.0

8 years ago