Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@
invalid.
</td>
</tr>
<tr>
<td>assistiveText: string</td>
<td></td>
<td>Assistive text to be placed bellow the input.</td>
</tr>
<tr>
<td>tabIndexValue: number</td>
<td><code>0</code></td>
Expand Down
1 change: 1 addition & 0 deletions projects/dxc-ngx-cdk/src/lib/dxc-select/select.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
</div>
<div class="mat-select-arrow-wrapper"><div class="mat-select-arrow"></div></div>
</div>
<span class="assistiveText">{{assistiveText}}</span>

<ng-template
cdk-connected-overlay
Expand Down
1 change: 1 addition & 0 deletions projects/dxc-ngx-cdk/src/lib/dxc-select/select.scss
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ $mat-select-placeholder-arrow-space: 2 *
text-overflow: ellipsis;
white-space: nowrap;
vertical-align: middle;
text-align: left;
}

.mat-select-value-text {
Expand Down
8 changes: 6 additions & 2 deletions projects/dxc-ngx-cdk/src/lib/dxc-select/select.ts
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,8 @@ export abstract class _MatSelectBase<C>

@Input() public label = "";

@Input() public assistiveText = "";

private floatingLabel = false;

/** Aria label of the select. If not specified, the placeholder will be used as label. */
Expand Down Expand Up @@ -1353,10 +1355,12 @@ export abstract class _MatSelectBase<C>
&.mat-select-disabled .mat-select-value {
color: var(--select-disabledColor);
}
.assistiveText {
font-size: 12px;
font-family: var(--fontFamily);
}
.assistiveText:not(.mat-select-disabled) {
color: var(--select-color);
font-size: 15px;
font-family: var(--fontFamily);
}

.selectLabel {
Expand Down