You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was trying to get this working well with ListView, I couldn't get it working properly. The ScrollableComponent feature you added was assuming that the Scrollable element had a child property which you could apply the marginTop to. A ListView doesn't have any child elements.
I have forked and updated your code changing it so that you nest the scrollable element as a child of headroom e.g the example would be like this:
Plus it changes the header from a absolute element so that the margin of the child element is all of the space that the header isn't using. So the stylesheet becomes(Headroom.js):
var styles = StyleSheet.create({
container: {
flex: 1
}
})
Plus the styles.content would have to have a background color for the View
Anyway... I know this is quite different to the way that you have it now. Let me know if you'd be interested in a pull request or if I should just continue on my fork. (https://github.com/sambwest/react-native-headroom)
The text was updated successfully, but these errors were encountered:
Hi,
I was trying to get this working well with ListView, I couldn't get it working properly. The ScrollableComponent feature you added was assuming that the Scrollable element had a child property which you could apply the marginTop to. A ListView doesn't have any child elements.
I have forked and updated your code changing it so that you nest the scrollable element as a child of headroom e.g the example would be like this:
And you can also use a ListView,FlatView etc like this:
The main change is to the render function which takes the child element and injects in the onScroll, like this (Headroom.js):
Plus it changes the header from a absolute element so that the margin of the child element is all of the space that the header isn't using. So the stylesheet becomes(Headroom.js):
Plus the styles.content would have to have a background color for the View
Anyway... I know this is quite different to the way that you have it now. Let me know if you'd be interested in a pull request or if I should just continue on my fork. (https://github.com/sambwest/react-native-headroom)
The text was updated successfully, but these errors were encountered: