UNPKG

office-ui-fabric-react

Version:

Reusable React components for building experiences for Office 365.

1 lines 2.21 kB
module.exports = "import * as React from 'react';\nimport { List } from './List';\nimport { IRectangle } from '../../common/IRectangle';\n\nexport interface IListProps extends React.Props<List> {\n /** Optional classname to append to root list. */\n className?: string;\n\n /** Items to render. */\n items?: any[];\n\n /** Method to call when trying to render an item. */\n onRenderCell?: (item?: any, index?: number) => React.ReactNode;\n\n /** Optional callback for monitoring when a page is added. */\n onPageAdded?: (page: IPage) => void;\n\n /** Optional callback for monitoring when a page is removed. */\n onPageRemoved?: (page: IPage) => void;\n\n /** Method called by the list to get how many items to render per page from specified index. */\n getItemCountForPage?: (itemIndex?: number, visibleRect?: IRectangle) => number;\n\n /**\n * Method called by the list to get the pixel height for a given page. By default, we measure the first\n * page's height and default all other pages to that height when calculating the surface space. It is\n * ideal to be able to adequately predict page heights in order to keep the surface space from jumping\n * in pixels, which has been seen to cause browser perforamnce issues.\n */\n getPageHeight?: (itemIndex?: number, visibleRect?: IRectangle) => number;\n\n /**\n * Method called by the list to derive the page style object. For spacer pages, the list will derive\n * the height and passed in heights will be ignored.\n */\n getPageStyle?: (page: IPage) => any;\n\n /**\n * In addition to the visible window, how many windowHeights should we render ahead.\n * @default 2\n */\n renderedWindowsAhead?: number;\n\n /**\n * In addition to the visible window, how many windowHeights should we render behind.\n * @default 2\n */\n renderedWindowsBehind?: number;\n\n /** Index in items array to start rendering from. Defaults to 0. */\n startIndex?: number;\n\n /** Number of items to render. Defaults to items.length. */\n renderCount?: number;\n}\n\nexport interface IPage {\n key: string;\n items: any[];\n startIndex: number;\n itemCount: number;\n style: any;\n top: number;\n height: number;\n}\n";