UNPKG

office-ui-fabric-react

Version:

Reusable React components for building experiences for Office 365.

45 lines (44 loc) 1.71 kB
import { BaseComponent } from '../../Utilities'; import { IResizeGroupProps } from './ResizeGroup.Props'; export interface IResizeGroupState { /** * Final data used to render proper sized component */ renderedData?: any; /** * Data to render in a hidden div for measurement */ dataToMeasure?: any; /** * Set to true when the content container might have new dimensions and should * be remeasured. */ measureContainer?: boolean; } /** * Returns a simple object is able to store measurements with a given key. */ export declare const getMeasurementCache: () => { getCachedMeasurement: (data: any) => number; addMeasurementToCache: (data: any, measurement: number) => void; }; /** * Returns a function that is able to compute the next state for the ResizeGroup given the current * state and any measurement updates. */ export declare const getNextResizeGroupStateProvider: (measurementCache?: { getCachedMeasurement: (data: any) => number; addMeasurementToCache: (data: any, measurement: number) => void; }) => (props: IResizeGroupProps, currentState: IResizeGroupState, getElementToMeasureWidth: () => number, newContainerWidth?: number) => IResizeGroupState; export declare class ResizeGroup extends BaseComponent<IResizeGroupProps, IResizeGroupState> { private _getNextResizeGroupState; private _root; private _measured; constructor(props: IResizeGroupProps); render(): JSX.Element; componentDidMount(): void; componentWillReceiveProps(nextProps: IResizeGroupProps): void; componentDidUpdate(prevProps: IResizeGroupProps): void; private _afterComponentRendered(); private _onResize(); }