office-ui-fabric-react
Version: 
Reusable React components for building experiences for Office 365.
48 lines (47 loc) • 2.11 kB
TypeScript
import * as PropTypes from 'prop-types';
import { BaseComponent } from '../../Utilities';
import { IScrollablePaneProps } from './ScrollablePane.Props';
import { Sticky } from '../../Sticky';
export interface IScrollablePaneContext {
    scrollablePane: PropTypes.Requireable<object>;
}
export declare class ScrollablePane extends BaseComponent<IScrollablePaneProps, {}> {
    static childContextTypes: IScrollablePaneContext;
    refs: {
        root: HTMLElement;
        stickyContainer: HTMLElement;
        stickyAbove: HTMLElement;
        stickyBelow: HTMLElement;
    };
    private _subscribers;
    private _stickyAbove;
    private _stickyBelow;
    constructor(props: IScrollablePaneProps);
    getChildContext(): {
        scrollablePane: {
            subscribe: (handler: (headerBound: ClientRect, footerBound: ClientRect) => void) => void;
            unsubscribe: (handler: (headerBound: ClientRect, footerBound: ClientRect) => void) => void;
            addStickyHeader: (sticky: Sticky) => void;
            removeStickyHeader: (sticky: Sticky) => void;
            addStickyFooter: (sticky: Sticky) => void;
            removeStickyFooter: (sticky: Sticky) => void;
            notifySubscribers: (sort?: boolean | undefined) => void;
        };
    };
    componentDidMount(): void;
    componentWillUnmount(): void;
    render(): JSX.Element;
    subscribe(handler: (headerBound: ClientRect, footerBound: ClientRect) => void): void;
    unsubscribe(handler: (headerBound: ClientRect, footerBound: ClientRect) => void): void;
    addStickyHeader(sticky: Sticky): void;
    addStickyFooter(sticky: Sticky): void;
    removeStickyHeader(sticky: Sticky): void;
    removeStickyFooter(sticky: Sticky): void;
    notifySubscribers(sort?: boolean): void;
    private _addSticky(sticky, stickyList, container, addStickyToContainer);
    private _removeSticky(sticky, stickyList, container);
    private _onWindowResize();
    private _resizeContainer();
    private _setPlaceholderHeights(stickies);
    private _sortStickies(stickyList, container);
}