Skip to content

Commit

Permalink
fix: keep placeholder visible in material theme
Browse files Browse the repository at this point in the history
fixes #358
  • Loading branch information
varnastadeus committed Mar 31, 2018
1 parent 2fca928 commit 1e16f98
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion demo/app/examples/reactive-forms.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ export class ReactiveFormsComponent {
heroId: 'hero1',
agree: null,
selectedCitiesIds: [],
age: ['', Validators.required],
age: [null, Validators.required],
album: '',
photo: ''
});
Expand Down
1 change: 0 additions & 1 deletion src/ng-select/ng-select.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
cursor: default;
}
}
.ng-has-value,
&.filtered {
.ng-placeholder {
display: none;
Expand Down
11 changes: 5 additions & 6 deletions src/themes/default.theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ $color-selected: #f5faff;
background-color: #f9f9f9;
}
}
.ng-has-value .ng-placeholder {
display: none;
}
.ng-control {
background-color: #fff;
border-radius: 4px;
Expand Down Expand Up @@ -195,13 +198,12 @@ $color-selected: #f5faff;
}
.ng-dropdown-panel-items {
margin-bottom: 1px;

.ng-optgroup {
user-select: none;
cursor: default;
padding: 8px 10px;
&.disabled {
color: rgba(0,0,0,.54);
color: rgba(0, 0, 0, .54);
}
&.marked {
background-color: #ebf5ff;
Expand All @@ -213,12 +215,10 @@ $color-selected: #f5faff;
font-weight: 600;
}
}

.ng-option {
background-color: #fff;
color: rgba(0,0,0,.87);
color: rgba(0, 0, 0, .87);
padding: 8px 10px;

&.selected {
color: #333;
background-color: $color-selected;
Expand All @@ -236,7 +236,6 @@ $color-selected: #f5faff;
&.ng-option-child {
padding-left: 22px;
}

.ng-tag-label {
padding-right: 5px;
font-size: 80%;
Expand Down

0 comments on commit 1e16f98

Please sign in to comment.