@acorex/components 16.19.18 → 16.19.19
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.
@@ -3863,7 +3863,7 @@ class AXDropdownComponent extends AXBaseDropdownComponent {
|
|
3863
3863
|
}
|
3864
3864
|
}
|
3865
3865
|
}
|
3866
|
-
dropdownWidth =
|
3866
|
+
dropdownWidth = '300px';
|
3867
3867
|
overlayRef;
|
3868
3868
|
templatePortal;
|
3869
3869
|
constructor(cdr, ref, overlay, viewContainerRef) {
|
@@ -3875,7 +3875,10 @@ class AXDropdownComponent extends AXBaseDropdownComponent {
|
|
3875
3875
|
}
|
3876
3876
|
ngOnInit() {
|
3877
3877
|
if (this.rtl == null) {
|
3878
|
-
this.rtl =
|
3878
|
+
this.rtl =
|
3879
|
+
window
|
3880
|
+
.getComputedStyle(this.ref.nativeElement, null)
|
3881
|
+
.getPropertyValue('direction') === 'rtl';
|
3879
3882
|
}
|
3880
3883
|
setTimeout(() => {
|
3881
3884
|
this.ref.nativeElement.classList.add(this.rtl ? 'rtl' : 'ltr');
|
@@ -3884,11 +3887,14 @@ class AXDropdownComponent extends AXBaseDropdownComponent {
|
|
3884
3887
|
}
|
3885
3888
|
ngAfterViewInit() {
|
3886
3889
|
setTimeout(() => {
|
3887
|
-
if (this.endButtons &&
|
3890
|
+
if (this.endButtons &&
|
3891
|
+
this.endButtons.nativeElement.childNodes.length !== 0) {
|
3888
3892
|
this.content.nativeElement.style.paddingInlineEnd = `${this.endButtons.nativeElement.clientWidth}px`;
|
3889
3893
|
}
|
3890
3894
|
if (this.fitParent == true) {
|
3891
|
-
this.dropdownWidth = `${this.dropdownEL.nativeElement.offsetWidth
|
3895
|
+
this.dropdownWidth = `${this.dropdownEL.nativeElement.offsetWidth > 100
|
3896
|
+
? this.dropdownEL.nativeElement.offsetWidth
|
3897
|
+
: 300}px`;
|
3892
3898
|
}
|
3893
3899
|
}, 5);
|
3894
3900
|
}
|
@@ -3932,36 +3938,36 @@ class AXDropdownComponent extends AXBaseDropdownComponent {
|
|
3932
3938
|
originX: 'start',
|
3933
3939
|
originY: 'bottom',
|
3934
3940
|
overlayX: 'start',
|
3935
|
-
overlayY: 'top'
|
3941
|
+
overlayY: 'top',
|
3936
3942
|
},
|
3937
3943
|
{
|
3938
3944
|
originX: 'start',
|
3939
3945
|
originY: 'bottom',
|
3940
3946
|
overlayX: 'start',
|
3941
|
-
overlayY: 'bottom'
|
3947
|
+
overlayY: 'bottom',
|
3942
3948
|
},
|
3943
3949
|
{
|
3944
3950
|
originX: 'end',
|
3945
3951
|
originY: 'bottom',
|
3946
3952
|
overlayX: 'end',
|
3947
|
-
overlayY: 'top'
|
3953
|
+
overlayY: 'top',
|
3948
3954
|
},
|
3949
3955
|
{
|
3950
3956
|
originX: 'end',
|
3951
3957
|
originY: 'bottom',
|
3952
3958
|
overlayX: 'end',
|
3953
|
-
overlayY: 'bottom'
|
3954
|
-
}
|
3959
|
+
overlayY: 'bottom',
|
3960
|
+
},
|
3955
3961
|
])
|
3956
3962
|
.withPush(false);
|
3957
3963
|
this.overlayRef = this.overlay.create({
|
3958
3964
|
positionStrategy,
|
3959
3965
|
//width: this.dropdownEL.nativeElement.clientWidth,
|
3960
3966
|
scrollStrategy: this.overlay.scrollStrategies.reposition({
|
3961
|
-
autoClose: true
|
3967
|
+
autoClose: true,
|
3962
3968
|
}),
|
3963
3969
|
hasBackdrop: true,
|
3964
|
-
backdropClass: 'cdk-overlay-transparent-backdrop'
|
3970
|
+
backdropClass: 'cdk-overlay-transparent-backdrop',
|
3965
3971
|
});
|
3966
3972
|
this.overlayRef.setDirection(this.rtl ? 'rtl' : 'ltr');
|
3967
3973
|
this.overlayRef.backdropClick().subscribe(() => this.close());
|