angular2-multiselect-dropdown
Advanced tools
Comparing version 1.1.4 to 1.1.5
{ | ||
"name": "angular2-multiselect-dropdown", | ||
"version": "1.1.4", | ||
"version": "1.1.5", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "angular-cli": {}, |
@@ -113,2 +113,3 @@ # Angular2 Multiselect Dropdown | ||
| limitSelection | Number | Limit the selection of number of items from the dropdown list. Once the limit is reached, all unselected items gets disabled. | none | | ||
| disabled | Boolean | Disable the dropdown | false | | ||
@@ -115,0 +116,0 @@ ### Callback Methods |
@@ -26,8 +26,4 @@ import { Pipe, PipeTransform } from '@angular/core'; | ||
applyFilter(item: ListItem, filter: ListItem): boolean { | ||
if (filter.itemName && item.itemName.toLowerCase().indexOf(filter.itemName.toLowerCase()) === -1) { | ||
return false; | ||
} | ||
else | ||
return true; | ||
return !(filter.itemName && item.itemName && item.itemName.toLowerCase().indexOf(filter.itemName.toLowerCase()) === -1); | ||
} | ||
} |
@@ -58,3 +58,4 @@ import { Component, OnInit, NgModule, OnChanges, ViewEncapsulation,forwardRef, Input, Output, EventEmitter, ElementRef, AfterViewInit, Pipe, PipeTransform } from '@angular/core'; | ||
badgeShowLimit: 999999999999, | ||
classes:'' | ||
classes:'', | ||
disabled: false | ||
} | ||
@@ -74,2 +75,6 @@ constructor(){ | ||
onItemClick(item: ListItem,index){ | ||
if(this.settings.disabled){ | ||
return false; | ||
} | ||
@@ -76,0 +81,0 @@ let found = this.isSelected(item); |
@@ -12,2 +12,3 @@ export interface DropdownSettings{ | ||
limitSelection?: Number; | ||
disabled?: Boolean; | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
24015
271
135