Kaynağa Gözat

Cleaning upo dynafield directive

Richard Knight 6 yıl önce
ebeveyn
işleme
7b4ad84d64

+ 2 - 2
src/app/dynaform/directives/dynafield.directive.ts

@@ -2,7 +2,7 @@ import {
 	Directive, ComponentFactoryResolver, ComponentRef, ViewContainerRef,
 	Input, Output, EventEmitter, OnInit, SkipSelf
 } from '@angular/core';
-import { Form, FormControl, ControlContainer, NgControl, ControlValueAccessor, ValidatorFn, AsyncValidatorFn, AbstractFormGroupDirective } from '@angular/forms';
+import { Form, FormControl, ControlContainer, NgControl, ControlValueAccessor, ValidatorFn, AsyncValidatorFn } from '@angular/forms';
 
 import * as formFieldComponents from './../components';
 
@@ -87,7 +87,7 @@ export class DynafieldDirective extends NgControl implements OnInit {
 			}
 			if (cssClass) {
 				const classesToAdd = Array.isArray(cssClass) ? cssClass : [cssClass];
-				el.classList.add(type.toLowerCase(), ...classesToAdd);
+				el.classList.add(...classesToAdd);
 			}
 
 			// Connect custom components