Skip to content

Commit 657bf8b

Browse files
author
Michael DESIGAUD
committed
Fix extraField view ref name
1 parent 77c28b8 commit 657bf8b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/webapp/app/form/extra-form.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ import {DateInputExtraField} from './fields/date-input-extra-field';
1515
})
1616
export class DynamicForm {
1717
@Input('entity') entityPromise:Promise<{extraFields:any}>;
18-
@ViewChild('extraField', {read: ViewContainerRef}) extraField:ViewContainerRef;
18+
@ViewChild('extraField', {read: ViewContainerRef}) extraFieldRef:ViewContainerRef;
1919
form:ExtraForm;
2020
onlyExtraFields:boolean = true;
21-
constructor(private http:Http,private dcl: DynamicComponentLoader, private elementRef: ElementRef) {
21+
constructor(private http:Http,private dcl: DynamicComponentLoader) {
2222
this.form = new ExtraForm();
2323
}
2424
ngOnInit():void {
@@ -53,7 +53,7 @@ export class DynamicForm {
5353
type = DateInputExtraField;
5454
}
5555

56-
this.dcl.loadNextToLocation(type,this.extraField).then((componentRef:ComponentRef<any>) => {
56+
this.dcl.loadNextToLocation(type,this.extraFieldRef).then((componentRef:ComponentRef<any>) => {
5757
let instance:ExtraField = componentRef.instance;
5858
instance.entity = entity;
5959
instance.field = field;

0 commit comments

Comments
 (0)