Skip to content

Commit 0046cdb

Browse files
committed
fix(suggest): repair placeholder rendering
show defaultValue in matChips placeholder if any on empty
1 parent 115b778 commit 0046cdb

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

projects/angular/components/ui-suggest/src/_ui-suggest.theme.scss

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,15 @@
6060
}
6161
}
6262

63+
mat-form-field.mat-form-field-hide-placeholder #{$componentName} {
64+
.mat-chip-list {
65+
.mat-input-element::placeholder {
66+
color: currentColor !important;
67+
-webkit-text-fill-color: currentColor !important;
68+
}
69+
}
70+
}
71+
6372
#{$componentName}:not(.form-control) {
6473
.display {
6574
&:focus {

projects/angular/components/ui-suggest/src/ui-suggest.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@
127127
<input *ngIf="searchable"
128128
[uiAutofocus]="isOpen"
129129
[refocus]="isOpen"
130-
[placeholder]="(this.isFormControl && !empty) ? null : placeholder"
130+
[placeholder]="(isFormControl && !empty) ? null : defaultValue"
131131
[formControl]="inputControl"
132132
[matChipInputFor]="chipList"
133133
[attr.maxlength]="maxLength"
@@ -171,7 +171,7 @@
171171

172172
<mat-form-field *ngIf="searchable && !multiple"
173173
floatLabel="never">
174-
<input [placeholder]="(this.isFormControl && !empty) ? null : placeholder"
174+
<input [placeholder]="isFormControl ? null : placeholder"
175175
[formControl]="inputControl"
176176
[uiAutofocus]="isOpen &&
177177
searchable"

0 commit comments

Comments
 (0)