Skip to content

Commit 66c9b23

Browse files
authored
Merge pull request #6468 from IgniteUI/iganchev/drop-down-scroll-brfix
Update dropdown containers styles
2 parents 080df9e + b8c035f commit 66c9b23

File tree

2 files changed

+10
-11
lines changed

2 files changed

+10
-11
lines changed

projects/igniteui-angular/src/lib/drop-down/drop-down.component.html

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1-
<div class="igx-drop-down__list"
2-
[style.width]="width"
3-
[style.height]="height"
4-
[style.maxHeight]="maxHeight"
5-
igxToggle
1+
<div class="igx-drop-down__list" igxToggle [style.width]="width"
62
(onOpening)="onToggleOpening($event)" (onOpened)="onToggleOpened()"
73
(onClosing)="onToggleClosing($event)" (onClosed)="onToggleClosed()">
8-
<div class="igx-drop-down__list-scroll" #scrollContainer [attr.id]="this.listId" role="listbox">
4+
<div class="igx-drop-down__list-scroll" #scrollContainer [attr.id]="this.listId" role="listbox"
5+
[style.height]="height"
6+
[style.maxHeight]="maxHeight">
97
<ng-container *ngIf="!collapsed">
108
<ng-content></ng-content>
119
</ng-container>

projects/igniteui-angular/src/lib/drop-down/drop-down.component.spec.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -870,9 +870,10 @@ describe('IgxDropDown ', () => {
870870
tick();
871871

872872
fixture.detectChanges();
873-
const toggleElement = fixture.debugElement.query(By.css('.' + CSS_CLASS_LIST)).nativeElement;
874-
expect(toggleElement.style.width).toEqual('80%');
875-
expect(toggleElement.style.height).toEqual('400px');
873+
let element = fixture.debugElement.query(By.css('.' + CSS_CLASS_SCROLL)).nativeElement;
874+
expect(element.style.height).toEqual('400px');
875+
element = fixture.debugElement.query(By.css('.' + CSS_CLASS_LIST)).nativeElement;
876+
expect(element.style.width).toEqual('80%');
876877
expect(fixture.componentInstance.dropdownDisabled.id).toEqual('newDD');
877878
}));
878879

@@ -1034,7 +1035,7 @@ describe('IgxDropDown ', () => {
10341035
tick();
10351036

10361037
fixture.detectChanges();
1037-
const ddList = fixture.debugElement.query(By.css('.igx-drop-down__list')).nativeElement;
1038+
const ddList = fixture.debugElement.query(By.css('.' + CSS_CLASS_SCROLL)).nativeElement;
10381039
expect(parseInt(ddList.style.maxHeight, 10)).toEqual(ddList.offsetHeight);
10391040
expect(ddList.style.maxHeight).toBe('100px');
10401041
}));
@@ -1047,7 +1048,7 @@ describe('IgxDropDown ', () => {
10471048
tick();
10481049

10491050
fixture.detectChanges();
1050-
const ddList = fixture.debugElement.query(By.css('.igx-drop-down__list')).nativeElement;
1051+
const ddList = fixture.debugElement.query(By.css('.' + CSS_CLASS_SCROLL)).nativeElement;
10511052
expect(parseInt(ddList.style.maxHeight, 10)).toBeGreaterThan(ddList.offsetHeight);
10521053
expect(ddList.style.maxHeight).toBe('700px');
10531054
}));

0 commit comments

Comments
 (0)