Skip to content

Commit f87f320

Browse files
committed
fix: dropdown position and datepicker size 🚑 (#1367)
* fix: dropdown position 🚑 * fix: datepicker size 🚑
1 parent 3fc40c5 commit f87f320

File tree

6 files changed

+10
-7
lines changed

6 files changed

+10
-7
lines changed

projects/ion/src/lib/dropdown/dropdown.component.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
}
2121

2222
.container-options {
23-
position: absolute;
2423
z-index: $zIndexLow;
2524
display: flex;
2625
flex-direction: column;

projects/ion/src/lib/dropdown/dropdown.component.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,9 @@ export class IonDropdownComponent implements AfterViewInit, OnDestroy {
161161

162162
this.overlayRef = this.overlay.create({
163163
positionStrategy,
164-
scrollStrategy: this.overlay.scrollStrategies.reposition(),
164+
scrollStrategy: this.overlay.scrollStrategies.reposition({
165+
autoClose: true,
166+
}),
165167
hasBackdrop: false,
166168
});
167169

projects/ion/src/lib/modal/modal.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ <h4 data-testid="modalTitle">{{ configuration().title }}</h4>
5454
/>
5555
}
5656

57-
<div class="modal-body">
57+
<div class="modal-body" cdkScrollable>
5858
<ng-template #modalBody />
5959
</div>
6060

projects/ion/src/lib/modal/modal.component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import {
1515
} from '@angular/core';
1616
import { CommonModule } from '@angular/common';
1717

18+
import { ScrollingModule } from '@angular/cdk/scrolling';
1819
import { generateIDs } from '../utils';
1920
import { IonModalConfiguration, IonModalResponse } from '../core/types/modal';
2021
import { IonButtonComponent } from '../button/button.component';
@@ -43,7 +44,7 @@ const defaultModal: IonModalConfiguration = {
4344
@Component({
4445
selector: 'ion-modal',
4546
standalone: true,
46-
imports: [CommonModule, IonButtonComponent, IonAlertComponent, IonIconComponent],
47+
imports: [CommonModule, IonButtonComponent, IonAlertComponent, IonIconComponent, ScrollingModule],
4748
templateUrl: './modal.component.html',
4849
styleUrls: ['./modal.component.scss'],
4950
changeDetection: ChangeDetectionStrategy.OnPush,
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.container-input {
2-
max-width: 200px;
2+
width: 100%;
33

44
&.range {
5-
max-width: 238px;
5+
width: 100%;
66
}
77
}

projects/ion/src/lib/picker/date-picker/date-picker.component.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55

66
:host {
77
position: relative;
8-
display: inline-block;
8+
display: block;
9+
width: 100%;
910
}
1011

1112
* {

0 commit comments

Comments
 (0)