@3kles/kles-material-dynamicforms 19.4.5 → 19.4.7

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.
@@ -395,7 +395,7 @@ class KlesDynamicFieldDirective {
395
395
  });
396
396
  }
397
397
  createComponentRef(injector) {
398
- const componentRef = this.container.createComponent(componentMapper.find((element) => element.type === this.field.type)?.component || this.field.component, {
398
+ const componentRef = this.container.createComponent(this.findComponent(), {
399
399
  injector,
400
400
  projectableNodes: [this.subComponents.map((sub) => sub.location.nativeElement)],
401
401
  });
@@ -409,6 +409,9 @@ class KlesDynamicFieldDirective {
409
409
  }
410
410
  return componentRef;
411
411
  }
412
+ findComponent() {
413
+ return componentMapper.find((element) => element.type === this.field.type)?.component || this.field.component;
414
+ }
412
415
  createSubComponent(componentType, options) {
413
416
  const injector = Injector.create(options);
414
417
  const component = this.container.createComponent(componentType, { injector });
@@ -1079,7 +1082,7 @@ class KlesFieldAbstract {
1079
1082
  this.inputType = computed(() => this.ui?.get(this.field.name)?.value()?.inputType);
1080
1083
  this.min = computed(() => this.ui?.get(this.field.name)?.value()?.min);
1081
1084
  this.max = computed(() => this.ui?.get(this.field.name)?.value()?.max);
1082
- this.maxLength = computed(() => this.ui?.get(this.field.name)?.value()?.maxLength);
1085
+ this.maxLength = computed(() => this.ui?.get(this.field.name)?.value()?.maxLength ?? 524288);
1083
1086
  this.step = computed(() => this.ui?.get(this.field.name)?.value()?.step);
1084
1087
  this.ngClass = computed(() => this.ui?.get(this.field.name)?.value()?.ngClass);
1085
1088
  this.ngStyle = computed(() => this.ui?.get(this.field.name)?.value()?.ngStyle);