<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label functional-group-widget"
     [class.functional-group-widget__invalid]="!field.isValid">
    <input class="mdl-textfield__input"
           type="text"
           [attr.id]="field.id"
           [(ngModel)]="value"
           (ngModelChange)="checkVisibility(field)"
           (keyup)="onKeyUp($event)"
           (blur)="onBlur()"
           [disabled]="field.readOnly">
    <label class="mdl-textfield__label" [attr.for]="field.id">{{field.name}}</label>
    <span *ngIf="field.validationSummary" class="mdl-textfield__error">{{field.validationSummary}}</span>
</div>
<div class="functional-group-widget--autocomplete mdl-shadow--2dp" *ngIf="popupVisible && groups.length > 0">
    <ul>
        <li *ngFor="let item of groups"
            class="mdl-menu__item"
            (click)="onItemClick(item, $event)">
            {{item.name}}
        </li>
    </ul>
</div>
