[ADF-5460] Add placeholder to SearchTextInputComponent (#7208)

This commit is contained in:
Thomas Hunter
2021-08-16 11:34:44 +01:00
committed by GitHub
parent d89957a4ec
commit 6dae24d424
3 changed files with 7 additions and 1 deletions

View File

@@ -40,6 +40,7 @@ Displays a input text that supports autocompletion
| searchTerm | `string` | "" | Search term preselected. |
| collapseOnBlur | `boolean` | "true" | Toggles whether to collapse the search on blur. |
| showClearButton | `boolean` | "false" | Toggles whether to show a clear button that closes the search. |
| placeholder | `string` | "" | Placeholder text to show in the input field |
### Events

View File

@@ -18,6 +18,7 @@
[autocomplete]="getAutoComplete()"
id="adf-control-input"
[(ngModel)]="searchTerm"
[placeholder]="placeholder"
(focus)="activateToolbar()"
(blur)="onBlur($event)"
(keyup.escape)="toggleSearchBar()"

View File

@@ -84,6 +84,10 @@ export class SearchTextInputComponent implements OnInit, OnDestroy {
@Input()
showClearButton: boolean = false;
/** Placeholder text to show in the input field */
@Input()
placeholder: string = '';
/** 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
* than three characters in length then it is truncated to an empty