Skip to content

Commit

Permalink
fix(multiselect): add disabled class for selected option closes #87 (#95
Browse files Browse the repository at this point in the history
)

* fix(multiselect): add disabled class for selected option closes #87

* remove space
  • Loading branch information
varnastadeus authored and anjmao committed Oct 21, 2017
1 parent 0edbd6d commit e79867e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/ng-select/ng-select.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="ng-value-container">
<div class="ng-placeholder" [hidden]="!showPlaceholder()">{{placeholder}}</div>
<ng-template #defaultLabelTemplate let-item="item">
<div class="ng-value-wrapper default">
<div class="ng-value-wrapper default" [class.disabled]="item.disabled">
<span class="ng-value-icon left" (click)="unselect(item); $event.stopPropagation()" aria-hidden="true">×</span>
<span class="ng-value-label">{{item[bindLabel]}}</span>
</div>
Expand Down
9 changes: 9 additions & 0 deletions src/ng-select/ng-select.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,10 @@ ng-select {
.ng-value-wrapper {
display: flex;
&.default {
&.disabled {
background-color: #f9f9f9;
border: 1px solid #e3e3e3;
}
background-color: $color-selected;
border-radius: 2px;
border: 1px solid #c2e0ff;
Expand All @@ -178,6 +182,11 @@ ng-select {
}
}
}
&.disabled {
.ng-value-icon {
display: none;
}
}
.ng-value-label {
padding: 0 5px;
}
Expand Down

0 comments on commit e79867e

Please sign in to comment.