@ngx-formly/core 6.0.3 → 6.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/lib/extensions/field-expression/field-expression.mjs +3 -2
- package/esm2020/lib/services/formly.config.mjs +7 -2
- package/fesm2015/ngx-formly-core.mjs +8 -3
- package/fesm2015/ngx-formly-core.mjs.map +1 -1
- package/fesm2020/ngx-formly-core.mjs +8 -3
- package/fesm2020/ngx-formly-core.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -2,8 +2,8 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { Type, TemplateRef, ComponentRef, ChangeDetectorRef, InjectionToken, Injectable, Optional, Directive, Input, ViewContainerRef, Component, ViewChild, EventEmitter, ChangeDetectionStrategy, Output, ContentChildren, Inject, NgModule } from '@angular/core';
|
|
3
3
|
import * as i2 from '@angular/forms';
|
|
4
4
|
import { AbstractControl, FormGroup, FormArray, FormControl, Validators } from '@angular/forms';
|
|
5
|
-
import { isObservable, merge, of, Observable,
|
|
6
|
-
import { distinctUntilChanged, startWith, debounceTime, filter, switchMap, take, map } from 'rxjs/operators';
|
|
5
|
+
import { isObservable, merge, of, Observable, Subject } from 'rxjs';
|
|
6
|
+
import { distinctUntilChanged, startWith, debounceTime, filter, switchMap, take, tap, map } from 'rxjs/operators';
|
|
7
7
|
import * as i2$1 from '@angular/common';
|
|
8
8
|
import { DOCUMENT, CommonModule } from '@angular/common';
|
|
9
9
|
import * as i1 from '@angular/platform-browser';
|
|
@@ -410,7 +410,12 @@ class FormlyConfig {
|
|
|
410
410
|
}
|
|
411
411
|
const componentRef = _viewContainerRef.createComponent(type.component, { injector: _injector });
|
|
412
412
|
defineHiddenProp(type, '_componentRef', componentRef);
|
|
413
|
-
|
|
413
|
+
try {
|
|
414
|
+
componentRef.destroy();
|
|
415
|
+
}
|
|
416
|
+
catch (e) {
|
|
417
|
+
console.error(`An error occurred while destroying the Formly component type "${field.type}"`, e);
|
|
418
|
+
}
|
|
414
419
|
return type._componentRef;
|
|
415
420
|
}
|
|
416
421
|
setWrapper(options) {
|