source: trip-planner-front/node_modules/@angular/cdk/scrolling/virtual-scroll-strategy.d.ts@ bdd6491

Last change on this file since bdd6491 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 1.7 KB
RevLine 
[6a3a178]1/**
2 * @license
3 * Copyright Google LLC All Rights Reserved.
4 *
5 * Use of this source code is governed by an MIT-style license that can be
6 * found in the LICENSE file at https://angular.io/license
7 */
8import { InjectionToken } from '@angular/core';
9import { Observable } from 'rxjs';
10import { CdkVirtualScrollViewport } from './virtual-scroll-viewport';
11/** The injection token used to specify the virtual scrolling strategy. */
12export declare const VIRTUAL_SCROLL_STRATEGY: InjectionToken<VirtualScrollStrategy>;
13/** A strategy that dictates which items should be rendered in the viewport. */
14export interface VirtualScrollStrategy {
15 /** Emits when the index of the first element visible in the viewport changes. */
16 scrolledIndexChange: Observable<number>;
17 /**
18 * Attaches this scroll strategy to a viewport.
19 * @param viewport The viewport to attach this strategy to.
20 */
21 attach(viewport: CdkVirtualScrollViewport): void;
22 /** Detaches this scroll strategy from the currently attached viewport. */
23 detach(): void;
24 /** Called when the viewport is scrolled (debounced using requestAnimationFrame). */
25 onContentScrolled(): void;
26 /** Called when the length of the data changes. */
27 onDataLengthChanged(): void;
28 /** Called when the range of items rendered in the DOM has changed. */
29 onContentRendered(): void;
30 /** Called when the offset of the rendered items changed. */
31 onRenderedOffsetChanged(): void;
32 /**
33 * Scroll to the offset for the given index.
34 * @param index The index of the element to scroll to.
35 * @param behavior The ScrollBehavior to use when scrolling.
36 */
37 scrollToIndex(index: number, behavior: ScrollBehavior): void;
38}
Note: See TracBrowser for help on using the repository browser.