mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
Add expandable input field to search control
This commit is contained in:
@@ -38,6 +38,9 @@ export class AlfrescoSearchControlComponent {
|
||||
@Input()
|
||||
inputType = 'text';
|
||||
|
||||
@Input()
|
||||
expandable: boolean = true;
|
||||
|
||||
@Output()
|
||||
searchChange = new EventEmitter();
|
||||
|
||||
@@ -56,6 +59,14 @@ export class AlfrescoSearchControlComponent {
|
||||
componentHandler.upgradeAllRegistered();
|
||||
}
|
||||
|
||||
getTextFieldClassName(): string {
|
||||
return 'mdl-textfield mdl-js-textfield' + (this.expandable ? ' mdl-textfield--expandable' : '');
|
||||
}
|
||||
|
||||
getTextFieldHolderClassName(): string {
|
||||
return this.expandable ? ' mdl-textfield__expandable-holder' : '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Method called on form submit, i.e. when the user has hit enter
|
||||
*
|
||||
|
Reference in New Issue
Block a user