Skip to content

Commit

Permalink
Updated ScrollSync docs
Browse files Browse the repository at this point in the history
  • Loading branch information
bvaughn committed Mar 5, 2016
1 parent cbe4945 commit c5238a5
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions docs/ScrollSync.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,13 @@ The child function is passed the following named parameters:

| Parameter | Type | Description |
|:---|:---|:---:|
| clientHeight | Number | Height of the visible portion of the `Grid` (or other scroll-synced component) |
| clientWidth | Number | Width of the visible portion of the `Grid` (or other scroll-synced component) |
| onScroll | Function | This function should be passed through to at least one of the virtualized child components. Updates to it will trigger updates to the scroll ofset parameters which will in turn update the other virtualized children. |
| scrollLeft | Number | The current left scroll offset. |
| scrollTop | Number | The current top scroll offset. |
| scrollHeight | Number | Total height of all rows in the `Grid` (or other scroll-synced component) |
| scrollLeft | Number | The current scroll-left offset. |
| scrollTop | Number | The current scroll-top offset. |
| scrollWidth | Number | Total width of all rows in the `Grid` (or other scroll-synced component) |

### Examples

Expand All @@ -28,7 +32,7 @@ import { Grid, ScrollSync, VirtualScroll } from 'react-virtualized'
function render (props) {
return (
<ScrollSync>
{({ onScroll, scrollLeft, scrollTop }) => (
{({ clientHeight, clientWidth, scrollHeight, scrollLeft, scrollTop, scrollWidth }) => (
<div className='Table'>
<div className='LeftColumn'>
<VirtualScroll
Expand Down

0 comments on commit c5238a5

Please sign in to comment.