Skip to content

Commit 5feef59

Browse files
authored
Merge pull request i6mi6#98 from ejkkan/feature/scrollevent-callback
Feature/scrollevent callback
2 parents a7b73e3 + 5b957c8 commit 5feef59

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ The `ParallaxScrollView` component adds a few additional properties, as describe
115115
| `stickyHeaderHeight` | `number` | If `renderStickyHeader` is used | If `renderStickyHeader` is set, then its height must be specified. |
116116
| `contentContainerStyle` | `object` | No | These styles will be applied to the scroll view content container which wraps all of the child views. (same as for [ScrollView](https://facebook.github.io/react-native/docs/scrollview.html#contentcontainerstyle)) |
117117
| `outputScaleValue` | `number` | No | The value for the scale interpolation output value, default `5` |
118+
| `scrollEvent` | `func` | No | Callback to recieve the animated scroll event values |
118119

119120

120121
## Latest changes

src/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ class ParallaxScrollView extends Component {
178178
onChangeHeaderVisibility,
179179
onScroll: prevOnScroll = e => {}
180180
} = this.props
181-
181+
this.props.scrollEvent && this.props.scrollEvent(e)
182182
const p = pivotPoint(parallaxHeaderHeight, stickyHeaderHeight)
183183

184184
// This optimization wont run, since we update the animation value directly in onScroll event

0 commit comments

Comments
 (0)