Skip to content

Commit

Permalink
fix(appearance): apply styles correctly
Browse files Browse the repository at this point in the history
closes #1422
  • Loading branch information
varnastadeus committed Nov 14, 2019
1 parent af4c6bb commit e78818e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="form-row">
<div class="form-group col-md-6">
<label for="yesno">Not searchable</label>
<ng-select #agreeSelect labelForId="yesno" [searchable]="false" formControlName="agree">
<ng-select appearance="outline" #agreeSelect labelForId="yesno" [searchable]="false" formControlName="agree">
<ng-option [value]="true">Yes</ng-option>
<ng-option [value]="false">No</ng-option>
</ng-select>
Expand All @@ -11,7 +11,7 @@
</div>
<div class="form-group col-md-6">
<label for="heroId">Basic select</label>
<ng-select [searchable]="false" [clearable]="false" labelForId="heroId" formControlName="heroId">
<ng-select appearance="outline" [searchable]="false" [clearable]="false" labelForId="heroId" formControlName="heroId">
<ng-option value="batman">
<img src="{{basePath}}/assets/batman.png" width="20px" height="20px"/>
Batman
Expand Down
7 changes: 6 additions & 1 deletion src/ng-select/lib/ng-select.component.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
<div (mousedown)="handleMousedown($event)" [class.ng-has-value]="hasValue" class="ng-select-container ng-appearance-{{appearance}}">
<div
(mousedown)="handleMousedown($event)"
[class.ng-appearance-outline]="appearance === 'outline'"
[class.ng-has-value]="hasValue"
class="ng-select-container">

<div class="ng-value-container">
<div class="ng-placeholder">{{placeholder}}</div>

Expand Down

1 comment on commit e78818e

@mahendra-virtueinfo
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello Team

Thanks for fix this issue.

Can you suggest me, I am using angular 6.0.3 and ng-select 2.0.3

I want this fix on 2.0.3 can you help me with what do I need?

I am not able to do angular upgrade.

Please sign in to comment.