mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
Add inputType option to search control component
This commit is contained in:
@@ -82,6 +82,7 @@ Also make sure you include these dependencies in your .html page:
|
|||||||
|
|
||||||
```html
|
```html
|
||||||
<alfresco-search-control [searchTerm]="searchTerm"
|
<alfresco-search-control [searchTerm]="searchTerm"
|
||||||
|
inputType="search"
|
||||||
(searchChange)="customMethod($event);">
|
(searchChange)="customMethod($event);">
|
||||||
</alfresco-search-control>
|
</alfresco-search-control>
|
||||||
```
|
```
|
||||||
@@ -141,7 +142,8 @@ bootstrap(SearchDemo, [
|
|||||||
|
|
||||||
#### Options
|
#### Options
|
||||||
|
|
||||||
**searchTerm**: {string} optional) default "". Search term to pre-populate the field with<br />
|
**searchTerm**: {string} (optional) default "". Search term to pre-populate the field with<br />
|
||||||
|
**inputType**: {string} (optional) default "text". Type of the input field to render, e.g. "search" or "text" (default)<br />
|
||||||
|
|
||||||
### Search results
|
### Search results
|
||||||
|
|
||||||
|
@@ -4,7 +4,7 @@
|
|||||||
<i class="material-icons">search</i>
|
<i class="material-icons">search</i>
|
||||||
</label>
|
</label>
|
||||||
<div class="mdl-textfield__expandable-holder">
|
<div class="mdl-textfield__expandable-holder">
|
||||||
<input class="mdl-textfield__input" type="text" id="searchTerm" [ngFormControl]="searchControl" [(ngModel)]="searchTerm">
|
<input class="mdl-textfield__input" [type]="inputType" id="searchTerm" [ngFormControl]="searchControl" [(ngModel)]="searchTerm">
|
||||||
<label class="mdl-textfield__label" for="searchTerm">Search content</label>
|
<label class="mdl-textfield__label" for="searchTerm">Search content</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -35,6 +35,9 @@ export class AlfrescoSearchControlComponent {
|
|||||||
@Input()
|
@Input()
|
||||||
searchTerm = '';
|
searchTerm = '';
|
||||||
|
|
||||||
|
@Input()
|
||||||
|
inputType = 'text';
|
||||||
|
|
||||||
@Output()
|
@Output()
|
||||||
searchChange = new EventEmitter();
|
searchChange = new EventEmitter();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user