UNPKG

office-ui-fabric-react

Version:

Reusable React components for building experiences for Office 365.

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