Skip to content

Commit c0895db

Browse files
committed
fixup! feat(cdk/scrolling): make scroller element configurable for virtual scrolling
1 parent 6b79cd0 commit c0895db

File tree

2 files changed

+20
-27
lines changed

2 files changed

+20
-27
lines changed

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

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1092,14 +1092,12 @@ describe('CdkVirtualScrollViewport', () => {
10921092
let testComponent: VirtualScrollWithCustomScrollingElement;
10931093
let viewport: CdkVirtualScrollViewport;
10941094

1095-
beforeEach(
1096-
waitForAsync(() => {
1097-
TestBed.configureTestingModule({
1098-
imports: [ScrollingModule],
1099-
declarations: [VirtualScrollWithCustomScrollingElement],
1100-
}).compileComponents();
1101-
}),
1102-
);
1095+
beforeEach(waitForAsync(() => {
1096+
TestBed.configureTestingModule({
1097+
imports: [ScrollingModule],
1098+
declarations: [VirtualScrollWithCustomScrollingElement],
1099+
}).compileComponents();
1100+
}));
11031101

11041102
beforeEach(() => {
11051103
fixture = TestBed.createComponent(VirtualScrollWithCustomScrollingElement);
@@ -1132,14 +1130,12 @@ describe('CdkVirtualScrollViewport', () => {
11321130
let testComponent: VirtualScrollWithScrollableWindow;
11331131
let viewport: CdkVirtualScrollViewport;
11341132

1135-
beforeEach(
1136-
waitForAsync(() => {
1137-
TestBed.configureTestingModule({
1138-
imports: [ScrollingModule],
1139-
declarations: [VirtualScrollWithScrollableWindow],
1140-
}).compileComponents();
1141-
}),
1142-
);
1133+
beforeEach(waitForAsync(() => {
1134+
TestBed.configureTestingModule({
1135+
imports: [ScrollingModule],
1136+
declarations: [VirtualScrollWithScrollableWindow],
1137+
}).compileComponents();
1138+
}));
11431139

11441140
beforeEach(() => {
11451141
fixture = TestBed.createComponent(VirtualScrollWithScrollableWindow);

tools/public_api_guard/cdk/scrolling.md

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -140,37 +140,35 @@ export type CdkVirtualForOfContext<T> = {
140140
odd: boolean;
141141
};
142142

143-
// @public (undocumented)
143+
// @public
144144
export abstract class CdkVirtualScrollable extends CdkScrollable {
145145
constructor(elementRef: ElementRef<HTMLElement>, scrollDispatcher: ScrollDispatcher, ngZone: NgZone, dir?: Directionality);
146-
// (undocumented)
147-
abstract getBoundingClientRectWithScrollOffset(from: 'left' | 'top' | 'right' | 'bottom'): number;
148-
// (undocumented)
146+
abstract measureBoundingClientRectWithScrollOffset(from: 'left' | 'top' | 'right' | 'bottom'): number;
149147
measureViewportSize(orientation: 'horizontal' | 'vertical'): number;
150148
// (undocumented)
151149
static ɵdir: i0.ɵɵDirectiveDeclaration<CdkVirtualScrollable, never, never, {}, {}, never>;
152150
// (undocumented)
153151
static ɵfac: i0.ɵɵFactoryDeclaration<CdkVirtualScrollable, [null, null, null, { optional: true; }]>;
154152
}
155153

156-
// @public (undocumented)
154+
// @public
157155
export class CdkVirtualScrollableElement extends CdkVirtualScrollable {
158156
constructor(elementRef: ElementRef, scrollDispatcher: ScrollDispatcher, ngZone: NgZone, dir: Directionality);
159157
// (undocumented)
160-
getBoundingClientRectWithScrollOffset(from: 'left' | 'top' | 'right' | 'bottom'): number;
158+
measureBoundingClientRectWithScrollOffset(from: 'left' | 'top' | 'right' | 'bottom'): number;
161159
// (undocumented)
162160
static ɵdir: i0.ɵɵDirectiveDeclaration<CdkVirtualScrollableElement, "[cdk-virtual-scrollable-element], [cdkVirtualScrollableElement]", never, {}, {}, never>;
163161
// (undocumented)
164162
static ɵfac: i0.ɵɵFactoryDeclaration<CdkVirtualScrollableElement, [null, null, null, { optional: true; }]>;
165163
}
166164

167-
// @public (undocumented)
165+
// @public
168166
export class CdkVirtualScrollableWindow extends CdkVirtualScrollable {
169167
constructor(scrollDispatcher: ScrollDispatcher, ngZone: NgZone, dir: Directionality);
170168
// (undocumented)
171169
protected _elementScrolled: Observable<Event>;
172170
// (undocumented)
173-
getBoundingClientRectWithScrollOffset(from: 'left' | 'top' | 'right' | 'bottom'): number;
171+
measureBoundingClientRectWithScrollOffset(from: 'left' | 'top' | 'right' | 'bottom'): number;
174172
// (undocumented)
175173
static ɵdir: i0.ɵɵDirectiveDeclaration<CdkVirtualScrollableWindow, "cdk-virtual-scroll-viewport[scrollable-window]", never, {}, {}, never>;
176174
// (undocumented)
@@ -196,16 +194,15 @@ export class CdkVirtualScrollViewport extends CdkVirtualScrollable implements On
196194
detach(): void;
197195
// (undocumented)
198196
elementRef: ElementRef<HTMLElement>;
199-
// (undocumented)
200-
getBoundingClientRectWithScrollOffset(from: 'left' | 'top' | 'right' | 'bottom'): number;
201197
getDataLength(): number;
202198
getOffsetToRenderedContentStart(): number | null;
203199
getRenderedRange(): ListRange;
204200
getViewportSize(): number;
201+
// (undocumented)
202+
measureBoundingClientRectWithScrollOffset(from: 'left' | 'top' | 'right' | 'bottom'): number;
205203
measureRangeSize(range: ListRange): number;
206204
measureRenderedContentSize(): number;
207205
measureScrollOffset(from?: 'top' | 'left' | 'right' | 'bottom' | 'start' | 'end'): number;
208-
// (undocumented)
209206
measureViewportOffset(from?: 'top' | 'left' | 'right' | 'bottom' | 'start' | 'end'): number;
210207
// (undocumented)
211208
ngOnDestroy(): void;

0 commit comments

Comments
 (0)