cubex-multiselect-dropdown
Version:
101 lines (79 loc) • 2 kB
Markdown
## Installation
```bash
npm install --save cubex-multiselect-dropdown
```
## Usage
```ts
import { MultiselectDropdownModule } from 'cubex-multiselect-dropdown';
({
declarations: [
AppComponent
],
imports: [
BrowserModule,
MultiselectDropdownModule, ########'Cubex Dropdown'
],
providers: [],
bootstrap: [AppComponent]
})
```
## HTML file
```html
<cubex-singleselect-dropdown
[selectionWidth]="11"
[width]="111"
[height]="200"
[isOpen]="false"
[data]='[
{ "name": "Option1", value:"Option1" },
{ "name": "Option2", value:"Option2" },
{ "name": "Option3","value":"Option3" }]'
[displayKey]="'name'"
[toggleKey]="'value'"
(onChange)="multiselectOnchage($event)"
[label]="'Entities'"
[placeholder]="'Select an option'"
>
</cubex-singleselect-dropdown>
////////////////////////////////////////////////////////////////
<cubex-multiselect-dropdown
[selectionWidth]="11"
[width]="111"
[height]="200"
[isOpen]="false"
[data]='[
{ "name": "Option1", value:"Option1" },
{ "name": "Option2", value:"Option2" },
{ "name": "Option3","value":"Option3" }]'
[displayKey]="'name'"
[toggleKey]="'value'"
(onChange)="singleselectOnchage($event)"
[label]="'Entities'"
[placeholder]="'Select an option'"
>
</cubex-multiselect-dropdown>
```
## TS file
```ts
/**
* singleselectOnchage
* $event will return selected data []
*/
singleselectOnchage($event){
console.log($event);
}
/**
* multiselectOnchage
* $event will return selected data []
*/
multiselectOnchage($event){
console.log($event);
}
```
<!-- ## Contributing
Cubex Dropdown is developed by a team of Cerulean developers in India. If any feedback or bugs please contact [rameshirreplaceable.com]()
Please make sure to update tests as appropriate. -->
## License
[MIT](http://www.cisco.com/)
## Author
[Ramesh M]() (Developer)