Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/lmelvin/ng6-combobox

A simple combobox component built on Angular 6 and Bootstrap 4
https://github.com/lmelvin/ng6-combobox

angular-cli angular6 typescript

Last synced: 22 days ago
JSON representation

A simple combobox component built on Angular 6 and Bootstrap 4

Awesome Lists containing this project

README

        

# ng6-combobox

A simple combobox component built for Angular 6 reactive forms and Bootstrap 4

#### Installation
`npm install ng6-combobox`

In your ngModule
```html
import { Ng6Module } from 'ng6-combobox';
```
```html
@NgModule({
imports: [
Ng6Module
})
```

#### Selector
`ng6-combo-box`

#### Inputs

| Attribute | Type | Description |
| -------------- | ------------- | ---------------------------------------------------------------------------- |
| `data` | Object[] | The data list of pre-defined options |
| `propertyName` | string | The name of the property in the `data` array used to display in the dropdown |
| `buttonClass` | string | The class to use for the button group (ex. 'fa fa-angle-down') |
| `placeholder` | string | The input placeholder |

#### Outputs

| Attribute | Description |
| -------------- | --------------------------------------------------------------------------------------------------- |
| `selectItem` | Fires when an item is selected by mouse click. The payload is the value of the item selected |
| `textChange` | Fires when text is manually entered by keystroke. The payload is the value of the text in the input |

```html

```