Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
clauderic committed Mar 7, 2017
2 parents 6e1d19e + 4db4fb1 commit c5e0bc6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ const virtualizedList = new VirtualizedList(element, {
return element;
},
rowHeight: [150, 120, 100, 80, 50, 35, 200, 500, 50, 300],
estimatedRowHeight: 155,
overscanCount: 5, // Number of rows to render above/below the visible rows.
onMount: () => {
// Once the component has mounted, we set an initial index to scrollTo
Expand Down
1 change: 1 addition & 0 deletions demo/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const rowHeights = data.map(getRandomHeight);
var virtualizedList = new VirtualizedList(container, {
data,
rowHeight: rowHeights,
estimatedRowHeight: 100,
renderRow: (row, index) => {
const element = document.createElement('div');
element.setAttribute('style', `height: ${rowHeights[index]}px; ${ELEMENT_STYLE}`);
Expand Down

0 comments on commit c5e0bc6

Please sign in to comment.