mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-5460] Add placeholder to SearchTextInputComponent (#7208)
This commit is contained in:
@@ -40,6 +40,7 @@ Displays a input text that supports autocompletion
|
|||||||
| searchTerm | `string` | "" | Search term preselected. |
|
| searchTerm | `string` | "" | Search term preselected. |
|
||||||
| collapseOnBlur | `boolean` | "true" | Toggles whether to collapse the search on blur. |
|
| 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. |
|
| 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
|
### Events
|
||||||
|
|
||||||
|
@@ -18,6 +18,7 @@
|
|||||||
[autocomplete]="getAutoComplete()"
|
[autocomplete]="getAutoComplete()"
|
||||||
id="adf-control-input"
|
id="adf-control-input"
|
||||||
[(ngModel)]="searchTerm"
|
[(ngModel)]="searchTerm"
|
||||||
|
[placeholder]="placeholder"
|
||||||
(focus)="activateToolbar()"
|
(focus)="activateToolbar()"
|
||||||
(blur)="onBlur($event)"
|
(blur)="onBlur($event)"
|
||||||
(keyup.escape)="toggleSearchBar()"
|
(keyup.escape)="toggleSearchBar()"
|
||||||
|
@@ -73,7 +73,7 @@ export class SearchTextInputComponent implements OnInit, OnDestroy {
|
|||||||
collapseOnSubmit: boolean = true;
|
collapseOnSubmit: boolean = true;
|
||||||
|
|
||||||
/** Default state expanded or Collapsed. */
|
/** Default state expanded or Collapsed. */
|
||||||
@Input()
|
@Input()
|
||||||
defaultState: SearchTextStateEnum = SearchTextStateEnum.collapsed;
|
defaultState: SearchTextStateEnum = SearchTextStateEnum.collapsed;
|
||||||
|
|
||||||
/** Toggles whether to collapse the search on blur. */
|
/** Toggles whether to collapse the search on blur. */
|
||||||
@@ -84,6 +84,10 @@ export class SearchTextInputComponent implements OnInit, OnDestroy {
|
|||||||
@Input()
|
@Input()
|
||||||
showClearButton: boolean = false;
|
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
|
/** 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
|
||||||
|
Reference in New Issue
Block a user