@klippa/ngx-enhancy-forms 14.10.3 → 14.10.5
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/elements/select/select.component.mjs +6 -3
- package/esm2020/lib/form/form.component.mjs +3 -3
- package/fesm2015/klippa-ngx-enhancy-forms.mjs +8 -5
- package/fesm2015/klippa-ngx-enhancy-forms.mjs.map +1 -1
- package/fesm2020/klippa-ngx-enhancy-forms.mjs +7 -4
- package/fesm2020/klippa-ngx-enhancy-forms.mjs.map +1 -1
- package/lib/elements/select/select.component.d.ts +1 -1
- package/lib/form/form.component.d.ts +1 -1
- package/package.json +1 -1
|
@@ -173,7 +173,7 @@ class FormComponent {
|
|
|
173
173
|
this.formGroup.patchValue(valueBeforeInject);
|
|
174
174
|
}
|
|
175
175
|
injectInto.setControl(injectAt, this.formGroup);
|
|
176
|
-
this.onInjected.emit();
|
|
176
|
+
this.onInjected.emit(valueBeforeInject);
|
|
177
177
|
}
|
|
178
178
|
else if (injectInto instanceof UntypedFormGroup) {
|
|
179
179
|
if (typeof injectAt !== 'string') {
|
|
@@ -187,7 +187,7 @@ class FormComponent {
|
|
|
187
187
|
this.formGroup.patchValue(valueBeforeInject);
|
|
188
188
|
}
|
|
189
189
|
injectInto.setControl(injectAt, this.formGroup);
|
|
190
|
-
this.onInjected.emit();
|
|
190
|
+
this.onInjected.emit(valueBeforeInject);
|
|
191
191
|
}
|
|
192
192
|
}
|
|
193
193
|
}
|
|
@@ -943,7 +943,9 @@ class SelectComponent extends ValueAccessorBase {
|
|
|
943
943
|
this.lastItemIndexReached = -1;
|
|
944
944
|
this.setWidthBasedOnOptionsWidths();
|
|
945
945
|
}
|
|
946
|
-
this.
|
|
946
|
+
if (this.dropdownPosition === 'top' || this.dropdownPosition === 'bottom' || this.dropdownPosition === 'auto') {
|
|
947
|
+
this.dropdownPositionToUse = this.dropdownPosition;
|
|
948
|
+
}
|
|
947
949
|
}
|
|
948
950
|
getDefaultTranslation(key) {
|
|
949
951
|
switch (key) {
|
|
@@ -998,7 +1000,8 @@ class SelectComponent extends ValueAccessorBase {
|
|
|
998
1000
|
const spaceInParent = limitingParentContainer.clientWidth;
|
|
999
1001
|
const spaceLeftOfElRef = this.elRef?.nativeElement.getBoundingClientRect().left - limitingParentContainer.getBoundingClientRect().left;
|
|
1000
1002
|
const spaceRightOfElRef = spaceInParent - spaceLeftOfElRef;
|
|
1001
|
-
|
|
1003
|
+
const spaceNeeded = dropdownPanel?.clientWidth ?? 0;
|
|
1004
|
+
if (this.dropdownPosition === 'right' || spaceRightOfElRef < spaceNeeded) {
|
|
1002
1005
|
dropdownPanel.style.right = `0px`;
|
|
1003
1006
|
}
|
|
1004
1007
|
}
|