Skip to content

Commit 9e08b3c

Browse files
committed
fix: issue#282 angular 11 build issue
1 parent 3b493b5 commit 9e08b3c

File tree

5 files changed

+34
-20
lines changed

5 files changed

+34
-20
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ng-multiselect-dropdown",
3-
"version": "0.2.12",
3+
"version": "0.3.0",
44
"private": true,
55
"description": "Angular Multi-Select Dropdown",
66
"author": "Nilesh Patel",

src/app/components/select/multiple-demo.html

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
<div class="col-md-4">
44
<h3>Select Multiple Cities</h3>
55
<form [formGroup]="myForm">
6-
<ng-multiselect-dropdown name="city" [placeholder]="'Select City'" [data]="cities" formControlName="city" [disabled]="disabled" [settings]="dropdownSettings" (onDropDownClose)="onDropDownClose()" (onSelect)="onItemSelect($event)" (onSelectAll)="onSelectAll($event)">
6+
<ng-multiselect-dropdown
7+
name="city" [placeholder]="'Select City'" [data]="cities" formControlName="city" [disabled]="disabled" [settings]="dropdownSettings" (onDropDownClose)="onDropDownClose()" (onSelect)="onItemSelect($event)" (onSelectAll)="onSelectAll($event)">
78
</ng-multiselect-dropdown>
89
</form>
910
<p></p>

src/ng-multiselect-dropdown/src/multi-select.component.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
{{item.text}}
77
<a style="padding-top:2px;padding-left:2px;color:white" (click)="onItemClick($event,item)">x</a>
88
</span>
9-
<span style="float:right !important;padding-right:4px">
9+
<span [ngClass]="{ 'dropdown-multiselect--active': _settings.defaultOpen }" style="float:right !important;padding-right:4px">
1010
<span style="padding-right: 6px;" *ngIf="itemShowRemaining()>0">+{{itemShowRemaining()}}</span>
11-
<span [ngClass]="_settings.defaultOpen ? 'dropdown-up' : 'dropdown-down'"></span>
11+
<span class="dropdown-multiselect__caret"></span>
1212
</span>
1313
</span>
1414
</div>

src/ng-multiselect-dropdown/src/multi-select.component.scss

+28-15
Original file line numberDiff line numberDiff line change
@@ -33,22 +33,35 @@ $disable-background-color: #eceeef;
3333
.selected-item:hover {
3434
box-shadow: 1px 1px #959595;
3535
}
36-
.dropdown-down {
37-
display: inline-block;
38-
top: 10px;
39-
width: 0;
40-
height: 0;
41-
border-top: 10px solid #adadad;
42-
border-left: 10px solid transparent;
43-
border-right: 10px solid transparent;
36+
.dropdown-multiselect__caret {
37+
line-height: 16px;
38+
display: block;
39+
position: absolute;
40+
box-sizing: border-box;
41+
width: 40px;
42+
height: 38px;
43+
right: 1px;
44+
top: 0px;
45+
padding: 4px 8px;
46+
margin: 0;
47+
text-decoration: none;
48+
text-align: center;
49+
cursor: pointer;
50+
transition: transform 0.2s ease;
4451
}
45-
.dropdown-up {
46-
display: inline-block;
47-
width: 0;
48-
height: 0;
49-
border-bottom: 10px solid #adadad;
50-
border-left: 10px solid transparent;
51-
border-right: 10px solid transparent;
52+
.dropdown-multiselect__caret:before {
53+
position: relative;
54+
right: 0;
55+
top: 65%;
56+
color: #999;
57+
margin-top: 4px;
58+
border-style: solid;
59+
border-width: 8px 8px 0 8px;
60+
border-color: #999999 transparent;
61+
content: "";
62+
}
63+
.dropdown-multiselect--active .dropdown-multiselect__caret {
64+
transform: rotateZ(180deg);
5265
}
5366
}
5467
.disabled {

src/ng-multiselect-dropdown/src/ng-multiselect-dropdown.module.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { ListFilterPipe } from './list-filter.pipe';
1313
})
1414

1515
export class NgMultiSelectDropDownModule {
16-
static forRoot(): ModuleWithProviders {
16+
static forRoot(): ModuleWithProviders<NgMultiSelectDropDownModule> {
1717
return {
1818
ngModule: NgMultiSelectDropDownModule
1919
};

0 commit comments

Comments
 (0)