@klippa/ngx-enhancy-forms 14.10.2 → 14.10.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/elements/select/select.component.mjs +4 -4
- package/esm2020/lib/form/form.component.mjs +3 -3
- package/fesm2015/klippa-ngx-enhancy-forms.mjs +5 -5
- package/fesm2015/klippa-ngx-enhancy-forms.mjs.map +1 -1
- package/fesm2020/klippa-ngx-enhancy-forms.mjs +5 -5
- package/fesm2020/klippa-ngx-enhancy-forms.mjs.map +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
|
}
|
|
@@ -987,6 +987,7 @@ class SelectComponent extends ValueAccessorBase {
|
|
|
987
987
|
const maxWidth = Math.max(...widths);
|
|
988
988
|
const dropdownPanel = this.elRef.nativeElement.querySelector('ng-dropdown-panel');
|
|
989
989
|
if (dropdownPanel) {
|
|
990
|
+
dropdownPanel.style.minWidth = `${this.elRef.nativeElement.clientWidth}px`;
|
|
990
991
|
dropdownPanel.style.width = `${Math.max(this.elRef.nativeElement.clientWidth, maxWidth + 40, dropdownPanel.getBoundingClientRect().width)}px`;
|
|
991
992
|
}
|
|
992
993
|
let limitingParentContainer = this.elRef.nativeElement;
|
|
@@ -997,9 +998,8 @@ class SelectComponent extends ValueAccessorBase {
|
|
|
997
998
|
const spaceInParent = limitingParentContainer.clientWidth;
|
|
998
999
|
const spaceLeftOfElRef = this.elRef?.nativeElement.getBoundingClientRect().left - limitingParentContainer.getBoundingClientRect().left;
|
|
999
1000
|
const spaceRightOfElRef = spaceInParent - spaceLeftOfElRef;
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
dropdownPanel.style.left = `-${shiftToLeft}px`;
|
|
1001
|
+
if (spaceRightOfElRef < dropdownPanel?.clientWidth) {
|
|
1002
|
+
dropdownPanel.style.right = `0px`;
|
|
1003
1003
|
}
|
|
1004
1004
|
}
|
|
1005
1005
|
});
|