Add expandable input field to search control

This commit is contained in:
Will Abson
2016-06-01 18:55:34 +01:00
parent a683cb12e6
commit 8f1659fca1
3 changed files with 15 additions and 3 deletions

View File

@@ -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
*