Skip to content

Commit 704bf12

Browse files
committed
* Moved dependencies to fix build issue for some users
* Better bootstrap4 support * Added fontawsome checkers alternative fixes #58
1 parent 34a8a46 commit 704bf12

File tree

3 files changed

+19
-16
lines changed

3 files changed

+19
-16
lines changed

package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-2-dropdown-multiselect",
3-
"version": "0.3.5",
3+
"version": "0.4.0",
44
"description": "Customizable dropdown multiselect in Angular 2 with bootstrap css.",
55
"main": "src/multiselect-dropdown.ts",
66
"repository": {
@@ -19,16 +19,16 @@
1919
},
2020
"homepage": "http://softsimon.github.io/angular-2-dropdown-multiselect",
2121
"dependencies": {
22-
"@angular/common": "^2.4.0",
23-
"@angular/compiler": "^2.4.0",
24-
"@angular/core": "^2.4.0",
25-
"@angular/forms": "^2.4.0",
26-
"rxjs": "^5.0.2",
27-
"zone.js": "^0.7.2"
2822
},
2923
"devDependencies": {
24+
"@angular/common": "^2.4.3",
25+
"@angular/compiler": "^2.4.3",
26+
"@angular/core": "^2.4.3",
27+
"@angular/forms": "^2.4.3",
28+
"rxjs": "^5.0.3",
29+
"zone.js": "^0.7.5",
3030
"codelyzer": "^2.0.0-beta.4",
31-
"tslint": "^4.0.0",
32-
"typescript": "^2.1.0"
31+
"tslint": "^4.3.1",
32+
"typescript": "^2.1.5"
3333
}
3434
}

src/multiselect-dropdown.html

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<div class="dropdown">
22
<button type="button" class="dropdown-toggle" [ngClass]="settings.buttonClasses"
33
(click)="toggleDropdown()">{{ title }}&nbsp;<span class="caret"></span></button>
4-
<ul *ngIf="isVisible" class="dropdown-menu" [class.pull-right]="settings.pullRight"
4+
<ul *ngIf="isVisible" class="dropdown-menu" [class.pull-right]="settings.pullRight" [class.dropdown-menu-right]="settings.pullRight"
55
[style.max-height]="settings.maxHeight" style="display: block; height: auto; overflow-y: auto;">
66
<li class="dropdown-item" *ngIf="settings.enableSearch">
77
<div class="input-group input-group-sm">
@@ -27,11 +27,14 @@
2727
</a>
2828
</li>
2929
<li *ngIf="settings.showCheckAll || settings.showUncheckAll" class="dropdown-divider divider"></li>
30-
<li class="dropdown-item" *ngFor="let option of options | searchFilter:searchFilterText">
31-
<a href="javascript:;" role="menuitem" tabindex="-1" (click)="setSelected($event, option)">
32-
<input *ngIf="settings.checkedStyle == 'checkboxes'" type="checkbox" [checked]="isSelected(option)" />
33-
<span *ngIf="settings.checkedStyle == 'glyphicon'" style="width: 16px;"
30+
<li class="dropdown-item" style="cursor: pointer;" *ngFor="let option of options | searchFilter:searchFilterText" (click)="setSelected($event, option)">
31+
<a href="javascript:;" role="menuitem" tabindex="-1">
32+
<input *ngIf="settings.checkedStyle === 'checkboxes'" type="checkbox" [checked]="isSelected(option)" />
33+
<span *ngIf="settings.checkedStyle === 'glyphicon'" style="width: 16px;"
3434
class="glyphicon" [class.glyphicon-ok]="isSelected(option)"></span>
35+
<span *ngIf="settings.checkedStyle === 'fontawsome'" style="width: 16px;display: inline-block;">
36+
<i *ngIf="isSelected(option)" class="fa fa-check" aria-hidden="true"></i>
37+
</span>
3538
{{ option.name }}
3639
</a>
3740
</li>

src/multiselect-dropdown.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export interface IMultiSelectOption {
3636
export interface IMultiSelectSettings {
3737
pullRight?: boolean;
3838
enableSearch?: boolean;
39-
checkedStyle?: 'checkboxes' | 'glyphicon';
39+
checkedStyle?: 'checkboxes' | 'glyphicon' | 'fontawsome';
4040
buttonClasses?: string;
4141
selectionLimit?: number;
4242
closeOnSelect?: boolean;
@@ -108,7 +108,7 @@ export class MultiselectDropdown implements OnInit, DoCheck, ControlValueAccesso
108108
pullRight: false,
109109
enableSearch: false,
110110
checkedStyle: 'checkboxes',
111-
buttonClasses: 'btn btn-default',
111+
buttonClasses: 'btn btn-default btn-secondary',
112112
selectionLimit: 0,
113113
closeOnSelect: false,
114114
autoUnselect: false,

0 commit comments

Comments
 (0)