Skip to content

Commit 761fb8e

Browse files
author
Jeremy Walker
committed
Improved documentation of style prop, as per bvaughn#424
1 parent c0e6e68 commit 761fb8e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

docs/Grid.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,8 @@ function cellRenderer ({
159159
isVisible, // This cell is visible within the grid (eg it is not an overscanned cell)
160160
key, // Unique key within array of cells
161161
rowIndex, // Vertical (row) index of cell
162-
style // Style object to be applied to cell (to position it)
162+
style // Style object to be applied to cell (to position it);
163+
// this must be passed through to the rendered cell element
163164
}) {
164165
// Grid data is a 2d array in this example...
165166
const user = list[rowIndex][columnIndex]
@@ -169,7 +170,8 @@ function cellRenderer ({
169170
? '...'
170171
: <User user={user} />
171172

172-
// Style is important since it specifies how the cell is to be sized and positioned.
173+
// Style is required since it specifies how the cell is to be sized and positioned,
174+
// and React Virtualized depends on this sizing/positioning for proper scrolling behavior..
173175
// By default, the grid component specifies, calculates, and initializes the following style properties:
174176
// height
175177
// width

0 commit comments

Comments
 (0)