@klippa/ngx-enhancy-forms 14.10.2 → 14.10.3
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/fesm2015/klippa-ngx-enhancy-forms.mjs +3 -3
- package/fesm2015/klippa-ngx-enhancy-forms.mjs.map +1 -1
- package/fesm2020/klippa-ngx-enhancy-forms.mjs +3 -3
- package/fesm2020/klippa-ngx-enhancy-forms.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -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
|
});
|