Skip to content

Commit 11783b7

Browse files
amcdnlmmalerba
authored andcommitted
fix(scrolling): adds right to fix pushed content (#11192)
* fix(scrolling): adds right to fix pushed content * chore: address feedback * chore: address pr feedback
1 parent 604f743 commit 11783b7

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

src/cdk-experimental/scrolling/virtual-scroll-viewport.scss

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,14 @@ cdk-virtual-scroll-viewport {
1414
will-change: contents, transform;
1515
}
1616

17+
.virtual-scroll-orientation-horizontal {
18+
bottom: 0;
19+
}
20+
21+
.virtual-scroll-orientation-vertical {
22+
right: 0;
23+
}
24+
1725
// Spacer element that whose width or height will be adjusted to match the size of the entire data
1826
// set if it were rendered all at once. This ensures that the scrollable content region is the
1927
// correct size.

src/cdk-experimental/scrolling/virtual-scroll-viewport.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ function rangesEqual(r1: ListRange, r2: ListRange): boolean {
4242
styleUrls: ['virtual-scroll-viewport.css'],
4343
host: {
4444
'class': 'cdk-virtual-scroll-viewport',
45+
'[class.virtual-scroll-orientation-horizontal]': 'orientation === "horizontal"',
46+
'[class.virtual-scroll-orientation-vertical]': 'orientation === "vertical"',
4547
},
4648
encapsulation: ViewEncapsulation.None,
4749
changeDetection: ChangeDetectionStrategy.OnPush,

0 commit comments

Comments
 (0)