onshore-forms 0.0.46 → 0.0.48
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/components/form-dropdown-item/form-dropdown-item.component.mjs +6 -4
- package/esm2020/lib/components/form-item-container/form-item-container.component.mjs +7 -1
- package/esm2020/lib/models/form.models.mjs +1 -1
- package/fesm2015/onshore-forms.mjs +13 -5
- package/fesm2015/onshore-forms.mjs.map +1 -1
- package/fesm2020/onshore-forms.mjs +11 -3
- package/fesm2020/onshore-forms.mjs.map +1 -1
- package/lib/models/form.models.d.ts +1 -0
- package/package.json +1 -1
|
@@ -401,6 +401,9 @@ class OnshoreFormItemContainer {
|
|
|
401
401
|
this.disabled = true;
|
|
402
402
|
}
|
|
403
403
|
this.layout = this.formTemplate.layout;
|
|
404
|
+
setTimeout(() => {
|
|
405
|
+
this.cdr.markForCheck();
|
|
406
|
+
}, 100);
|
|
404
407
|
}
|
|
405
408
|
ngAfterViewInit() {
|
|
406
409
|
this.onWindowResize();
|
|
@@ -427,6 +430,9 @@ class OnshoreFormItemContainer {
|
|
|
427
430
|
this.layout = this.formTemplate.layout;
|
|
428
431
|
this.onWindowResize();
|
|
429
432
|
}
|
|
433
|
+
if (previousValue?.labelStyle !== currentValue?.labelStyle) {
|
|
434
|
+
this.onWindowResize();
|
|
435
|
+
}
|
|
430
436
|
this.cdr.markForCheck();
|
|
431
437
|
}
|
|
432
438
|
}
|
|
@@ -882,7 +888,6 @@ class OnshoreFormDropdownItemComponent {
|
|
|
882
888
|
this.optionGroupLabel = '';
|
|
883
889
|
this.dataKey = '';
|
|
884
890
|
this.actionButtonDisabled = false;
|
|
885
|
-
this.options = [];
|
|
886
891
|
this.valueChange = new EventEmitter();
|
|
887
892
|
this.actionButtonClick = new EventEmitter();
|
|
888
893
|
this.disabled = false;
|
|
@@ -918,8 +923,11 @@ class OnshoreFormDropdownItemComponent {
|
|
|
918
923
|
this.ngControl.control?.disable();
|
|
919
924
|
}
|
|
920
925
|
ngOnChanges(changes) {
|
|
921
|
-
const currentOptions = changes['options']?.currentValue;
|
|
922
|
-
const previousOptions = changes['options']?.previousValue;
|
|
926
|
+
const currentOptions = changes['options']?.currentValue ?? changes['formTemplate']?.currentValue?.options;
|
|
927
|
+
const previousOptions = changes['options']?.previousValue ?? changes['formTemplate']?.previousValue?.options;
|
|
928
|
+
if (!this.options && currentOptions) {
|
|
929
|
+
this.options = currentOptions;
|
|
930
|
+
}
|
|
923
931
|
if (currentOptions?.length > 0 && currentOptions != previousOptions && !this.multiple) {
|
|
924
932
|
this.ngControl.control?.setValue(this.options[0]?.value);
|
|
925
933
|
}
|