mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +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
|
||||
<alfresco-search-control [searchTerm]="searchTerm"
|
||||
inputType="search"
|
||||
(searchChange)="customMethod($event);">
|
||||
</alfresco-search-control>
|
||||
```
|
||||
@@ -141,7 +142,8 @@ bootstrap(SearchDemo, [
|
||||
|
||||
#### 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
|
||||
|
||||
|
@@ -4,7 +4,7 @@
|
||||
<i class="material-icons">search</i>
|
||||
</label>
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -35,6 +35,9 @@ export class AlfrescoSearchControlComponent {
|
||||
@Input()
|
||||
searchTerm = '';
|
||||
|
||||
@Input()
|
||||
inputType = 'text';
|
||||
|
||||
@Output()
|
||||
searchChange = new EventEmitter();
|
||||
|
||||
|
Reference in New Issue
Block a user