react-scroll-sync
Advanced tools
Comparing version
@@ -188,2 +188,3 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
}); | ||
if (_this.props.onSync) _this.props.onSync(scrolledPane); | ||
}, _temp), _possibleConstructorReturn(_this, _ret); | ||
@@ -242,2 +243,8 @@ } | ||
ScrollSync.propTypes = { | ||
/** | ||
* Callback to be invoked any time synchronization happens | ||
* | ||
* @param {Element} el The element that has received the scroll event | ||
*/ | ||
onSync: _propTypes2.default.func, | ||
children: _propTypes2.default.element.isRequired, | ||
@@ -244,0 +251,0 @@ proportional: _propTypes2.default.bool, |
{ | ||
"name": "react-scroll-sync", | ||
"version": "0.7.1", | ||
"version": "0.8.0", | ||
"description": "Synchronize scroll positions across multiple scrollable containers", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -12,2 +12,8 @@ import React, { Component } from 'react' | ||
static propTypes = { | ||
/** | ||
* Callback to be invoked any time synchronization happens | ||
* | ||
* @param {Element} el The element that has received the scroll event | ||
*/ | ||
onSync: PropTypes.func, | ||
children: PropTypes.element.isRequired, | ||
@@ -136,2 +142,3 @@ proportional: PropTypes.bool, | ||
}) | ||
if (this.props.onSync) this.props.onSync(scrolledPane) | ||
} | ||
@@ -138,0 +145,0 @@ |
Sorry, the diff of this file is not supported yet
129861
0.68%1483
0.95%