Skip to content

Commit d2e4dc1

Browse files
committed
Document all the things! (...the id prop, that is)
1 parent a4eec4a commit d2e4dc1

File tree

4 files changed

+6
-2
lines changed

4 files changed

+6
-2
lines changed

docs/Collection.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,14 @@ Unlike `Grid`, which renders checkerboard data, `Collection` can render arbitrar
1010
| Property | Type | Required? | Description |
1111
|:---|:---|:---:|:---|
1212
| autoHeight | Boolean | | Outer `height` of `Collection` is set to "auto". This property should only be used in conjunction with the `WindowScroller` HOC. |
13-
| className | String | | Optional custom CSS class name to attach to root Collection element. |
13+
| className | String | | Optional custom CSS class name to attach to root `Collection` element. |
1414
| cellCount | Number || Number of cells in collection. |
1515
| cellGroupRenderer | Function | | Responsible for rendering a group of cells given their indices.: `({ cellSizeAndPositionGetter:Function, indices: Array<number>, cellRenderer: Function }): Array<PropTypes.node>` |
1616
| cellRenderer | Function || Responsible for rendering a cell given an row and column index: `({ index: number, isScrolling: boolean, key: string, style: object }): PropTypes.element` |
1717
| cellSizeAndPositionGetter | Function || Callback responsible for returning size and offset/position information for a given cell (index): `({ index: number }): { height: number, width: number, x: number, y: number }` |
1818
| height | Number || Height of Collection; this property determines the number of visible (vs virtualized) rows. |
1919
| horizontalOverscanSize | Number | | Enables the `Collection` to horiontally "overscan" its content similar to how `Grid` does. This can reduce flicker around the edges when a user scrolls quickly. This property defaults to `0`; |
20+
| id | String | | Optional custom CSS id to attach to root `Collection` element. |
2021
| noContentRenderer | Function | | Optional renderer to be rendered inside the grid when `cellCount` is 0: `(): PropTypes.node` |
2122
| onSectionRendered | Function | | Callback invoked with information about the section of the Collection that was just rendered: `({ indices: Array<number> }): void` |
2223
| onScroll | Function | | Callback invoked whenever the scroll offset changes within the inner scrollable region: `({ clientHeight: number, clientWidth: number, scrollHeight: number, scrollLeft: number, scrollTop: number, scrollWidth: number }): void` |

docs/Grid.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ A windowed grid of elements. `Grid` only renders cells necessary to fill itself
1717
| estimatedColumnSize | Number | | Used to estimate the total width of a `Grid` before all of its columns have actually been measured. The estimated total width is adjusted as columns are rendered. |
1818
| estimatedRowSize | Number | | Used to estimate the total height of a `Grid` before all of its rows have actually been measured. The estimated total height is adjusted as rows are rendered. |
1919
| height | Number || Height of Grid; this property determines the number of visible (vs virtualized) rows. |
20+
| id | String | | Optional custom CSS id to attach to root `Grid` element. |
2021
| noContentRenderer | Function | | Optional renderer to be rendered inside the grid when either `rowCount` or `columnCount` is empty: `(): PropTypes.node` |
2122
| onSectionRendered | Function | | Callback invoked with information about the section of the Grid that was just rendered. This callback is only invoked when visible rows have changed: `({ columnOverscanStartIndex: number, columnOverscanStopIndex: number, columnStartIndex: number, columnStopIndex: number, rowOverscanStartIndex: number, rowOverscanStopIndex: number, rowStartIndex: number, rowStopIndex: number }): void` |
2223
| onScroll | Function | | Callback invoked whenever the scroll offset changes within the inner scrollable region: `({ clientHeight: number, clientWidth: number, scrollHeight: number, scrollLeft: number, scrollTop: number, scrollWidth: number }): void` |
@@ -146,7 +147,7 @@ Responsible for rendering a single cell, given its row and column index.
146147
This function accepts the following named parameters:
147148

148149
```jsx
149-
function cellRenderer ({
150+
function cellRenderer ({
150151
columnIndex, // Horizontal (column) index of cell
151152
isScrolling, // The Grid is currently being scrolled
152153
key, // Unique key within array of cells

docs/List.md

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Elements can have fixed or varying heights.
1111
| className | String | | Optional custom CSS class name to attach to root `List` element. |
1212
| estimatedRowSize | Number | | Used to estimate the total height of a `List` before all of its rows have actually been measured. The estimated total height is adjusted as rows are rendered. |
1313
| height | Number || Height constraint for list (determines how many actual rows are rendered) |
14+
| id | String | | Optional custom CSS id to attach to root `List` element. |
1415
| noRowsRenderer | Function | | Callback used to render placeholder content when `rowCount` is 0 |
1516
| onRowsRendered | Function | | Callback invoked with information about the slice of rows that were just rendered: `({ overscanStartIndex: number, overscanStopIndex: number, startIndex: number, stopIndex: number }): void` |
1617
| onScroll | Function | | Callback invoked whenever the scroll offset changes within the inner scrollable region: `({ clientHeight: number, scrollHeight: number, scrollTop: number }): void` |

docs/Table.md

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ This component expects explicit `width` and `height` parameters.
1919
| headerHeight | Number || Fixed height of header row |
2020
| headerStyle | Object | | Optional custom inline style to attach to table header columns. |
2121
| height | Number || Fixed/available height for out DOM element |
22+
| id | String | | Optional custom CSS id to attach to root `Table` element. |
2223
| noRowsRenderer | Function | | Callback used to render placeholder content when :rowCount is 0 |
2324
| onHeaderClick | Function | | Callback invoked when a user clicks on a table header. `(dataKey: string, columnData: any): void` |
2425
| onRowClick | Function | | Callback invoked when a user clicks on a table row. `({ index: number }): void` |

0 commit comments

Comments
 (0)