# mysimple-multi-select

> Angular Multi select dropdown component for web applications. Easy to integrate and use.

Latest version **0.0.3** (published 2021-04-18) · 0 weekly downloads

## Install

```sh
npm install mysimple-multi-select
pnpm add mysimple-multi-select
yarn add mysimple-multi-select
bun add mysimple-multi-select
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2021-04-18 |
| First published | 2021-04-18 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 84.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | rjeyalakshmi |

## Links

- npm: https://www.npmjs.com/package/mysimple-multi-select
- npm.io page: https://npm.io/package/mysimple-multi-select

## Dependencies (1)

- [tslib](https://npm.io/package/tslib.md) ^1.9.0

## Recent versions

- 0.0.3 (latest) — 2021-04-18
- 0.0.2 — 2021-04-18
- 0.0.1 — 2021-04-18

## README

# Simple Angular Multi select dropdown

Angular Multi select dropdown component for web applications. Easy to integrate and use.

# Getting Started
# Features
- dropdown with multiple selction option.
- bind to any custom JSON object just by specifiying the keys for both label and value.
- search by either label or value.

### Installation

Run the below command to install the component
npm install mysimple-multi-select

And then include it in your module file as below.

```ts
import { MultiSelectModule } from 'mysimple-multi-select';
// ...

@NgModule({
  imports: [
    MultiSelectModule
    // ...
  ]
  // ...
})
```

### Usage

```ts
import { Component, OnInit } from '@angular/core';
export class AppComponent implements OnInit{
  isDropdownSearch = true; //Boolean value to enable/disable the search in multiselect dropdown.
  //Sample data to be bound to the dropdown.
  countries : any[] = [
    {"label": "Afghanistan", "value": "AF"}, 
     {"label": "land Islands", "value": "AX"}, 
     {"label": "Albania", "value": "AL"}, 
     {"label": "Algeria", "value": "DZ"}, 
     {"label": "American Samoa", "value": "AS"}, 
     {"label": "AndorrA", "value": "AD"}, 
     {"label": "Angola", "value": "AO"}, 
     {"label": "Anguilla", "value": "AI"}, 
     {"label": "Antarctica", "value": "AQ"}, 
     {"label": "Antigua and Barbuda", "value": "AG"}];
     filterBy: string = "label"; //filterBy option will decide whether search can be performed by either label or value.
     optionLabel: string = "label"; //Key which indicates the label of an option.
     optionValue: string = "value"; //Key which indicates the value of an option.
}
```
```html
<multiSelect [options]="countries" 
(onChanged)="getSelectedCountries($event)" 
[allowSearch]="isDropdownSearch" 
[searchBy]="filterBy"
[optionLabel]="optionLabel"
[optionValue]="optionValue" ></multiSelect>
```

### Settings

| Setting                        | Type       | Description                                                                             | 
| :----------------------------- | :--------- | :---------------------------------------------------------------------------------------|
| options                		 | Array<any> | An array of objects to display as the available                                         |                                                                                                                                            
| allowSearch                    | Boolean    | Text to be show in the dropdown, when no items are selected.                            |
| searchBy						 | String     | This will decide whether search can be performed by either label or value.              |
| optionLabel                    | String     | Key which indicates the label of an option.                                             |
| optionValue                    | String     | Key which indicates the value of an option.

### Callback Methods
- `onChanged` - Return the selected item when an item is checked.
  Example : (onChanged)="getSelectedCountries($event)"

---
_Source: https://npm.io/package/mysimple-multi-select · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
