[AAE-5715] support hint labels for search input (#7444)

This commit is contained in:
Denys Vuika
2022-01-12 15:09:55 +00:00
committed by GitHub
parent 790e3d465d
commit 0bf6eae731
2 changed files with 5 additions and 1 deletions

View File

@@ -10,7 +10,7 @@
(keyup.enter)="toggleSearchBar()"> (keyup.enter)="toggleSearchBar()">
<mat-icon [attr.aria-label]="'SEARCH.BUTTON.ARIA-LABEL' | translate">search</mat-icon> <mat-icon [attr.aria-label]="'SEARCH.BUTTON.ARIA-LABEL' | translate">search</mat-icon>
</button> </button>
<mat-form-field class="adf-input-form-field-divider"> <mat-form-field class="adf-input-form-field-divider" [hintLabel]="hintLabel">
<input matInput <input matInput
#searchInput #searchInput
[attr.aria-label]="'SEARCH.INPUT.ARIA-LABEL' | translate" [attr.aria-label]="'SEARCH.INPUT.ARIA-LABEL' | translate"

View File

@@ -89,6 +89,10 @@ export class SearchTextInputComponent implements OnInit, OnDestroy {
@Input() @Input()
placeholder: string = ''; placeholder: string = '';
/** Hint label */
@Input()
hintLabel = '';
/** Emitted when the search term is changed. The search term is provided /** Emitted when the search term is changed. The search term is provided
* in the 'value' property of the returned object. If the term is less * in the 'value' property of the returned object. If the term is less
* than three characters in length then it is truncated to an empty * than three characters in length then it is truncated to an empty