mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
Additional unit tests for form widgets
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { Input, AfterViewInit, Output, EventEmitter } from '@angular/core';
|
||||
import { Input, AfterViewInit, Output, EventEmitter, ElementRef } from '@angular/core';
|
||||
import { FormFieldModel } from './core/index';
|
||||
|
||||
/**
|
||||
@@ -63,6 +63,18 @@ export class WidgetComponent implements AfterViewInit {
|
||||
return false;
|
||||
}
|
||||
|
||||
setupMaterialTextField(elementRef: ElementRef, handler: any, value: string) {
|
||||
if (elementRef && handler) {
|
||||
let el = elementRef.nativeElement;
|
||||
if (el) {
|
||||
let container = el.querySelector('.mdl-textfield');
|
||||
if (container) {
|
||||
container.MaterialTextfield.change(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
checkVisibility(field: FormFieldModel) {
|
||||
this.fieldChanged.emit(field);
|
||||
}
|
||||
|
Reference in New Issue
Block a user