Skip to content

Commit 2f351e2

Browse files
committed
refactor(cdk/table): remove unnecessary factory
We can put the factory in-line, instead of having to export it.
1 parent a66045d commit 2f351e2

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/cdk/table/table-virtual-scroll.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,6 @@ import {
2525
} from './sticky-position-listener';
2626
import {_TABLE_VIEW_CHANGE_STRATEGY, CdkTable, RenderRow, RowContext} from './table';
2727

28-
/** @docs-private */
29-
export const _TABLE_VIRTUAL_SCROLL_COLLECTION_VIEWER_FACTORY = () =>
30-
new BehaviorSubject<ListRange>({start: 0, end: 0});
31-
3228
/**
3329
* Scheduler to be used for scroll events. Needs to fall back to
3430
* something that doesn't rely on requestAnimationFrame on environments
@@ -48,11 +44,11 @@ const SCROLL_SCHEDULER =
4844
providers: [
4945
{provide: _VIEW_REPEATER_STRATEGY, useClass: _RecycleViewRepeaterStrategy},
5046
{provide: STICKY_POSITIONING_LISTENER, useExisting: CdkTableVirtualScroll},
51-
// Initially emit an empty range. The virtual scroll viewport will update the range after it is
52-
// initialized.
5347
{
5448
provide: _TABLE_VIEW_CHANGE_STRATEGY,
55-
useFactory: _TABLE_VIRTUAL_SCROLL_COLLECTION_VIEWER_FACTORY,
49+
// Initially emit an empty range. The virtual scroll
50+
// viewport will update the range after it is initialized.
51+
useFactory: () => new BehaviorSubject<ListRange>({start: 0, end: 0}),
5652
},
5753
],
5854
host: {

0 commit comments

Comments
 (0)