Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Finalised param usage
  • Loading branch information
[email protected] committed Nov 29, 2019
commit ab91110b78917a83576a9ee4f85f9346978899d6
2 changes: 1 addition & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export interface ParallaxScrollViewProps {
style?: any;
parallaxHeaderHeight?: number;
resetScroll?: bool;
resetScrollSuccessfull?: func;
resetScrollSuccessfull?: () => void;
navBarOverlapHeight?: number;
scrollViewBackgroundColor?: string;
}
Expand Down
6 changes: 4 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ class ParallaxScrollView extends Component {
style,
contentContainerStyle,
outputScaleValue,
scrollViewBackgroundColor,
...scrollViewProps
} = this.props

Expand Down Expand Up @@ -131,15 +132,15 @@ class ParallaxScrollView extends Component {
const scrollElement = renderScrollComponent(scrollViewProps)
return (
<View
style={[style, styles.container]}
style={[style, styles.container,{backgroundColor: scrollViewBackgroundColor}]}
onLayout={e => this._maybeUpdateViewDimensions(e)}
>
{background}
{React.cloneElement(
scrollElement,
{
ref: SCROLLVIEW_REF,
style: [{backgroundColor: scrollViewBackgroundColor}, scrollElement.props.style],
style: [style, scrollElement.props.style],
scrollEventThrottle: 1,
// Using Native Driver greatly optimizes performance
onScroll: Animated.event(
Expand Down Expand Up @@ -192,6 +193,7 @@ class ParallaxScrollView extends Component {
parallaxHeaderHeight,
stickyHeaderHeight,
onChangeHeaderVisibility,
navBarOverlapHeight,
onScroll: prevOnScroll = () => { }
} = this.props
this.props.scrollEvent && this.props.scrollEvent(e)
Expand Down