Closed sentry0 closed 3 years ago
onBottomReached seems to work fine when I do something like a console.log but it refuses to fire the callback for some reason. Am I do something silly or is this broken?
const srdDocs = { attributes: attributes, }; export default class SrdPanel extends Component { static propTypes = { filename: PropTypes.string.isRequired, entryKey: PropTypes.string.isRequired, show: PropTypes.bool.isRequired, onClose: PropTypes.func.isRequired, }; _close() { console.log('before'); this.props.onClose(); console.log('after'); } render() { const {height} = Dimensions.get('window'); const srdEntry = srdDocs[this.props.filename]; const pos = new Animated.Value(this.props.show ? verticalScale(150) : 0); return ( <SlidingUpPanel animatedValue={pos} height={height} onBottomReached={() => this._close()}> <View style={{flex: 1, backgroundColor: BACKGROUND_COLOR, alignItems: 'center'}}> <Text style={styles.modalHeader}>{srdEntry.title}</Text> </View> </SlidingUpPanel> ); } }
Nevermind... issue was on my end it looks like.
What was the issue? I'm having the same problem.
Issue Description
onBottomReached seems to work fine when I do something like a console.log but it refuses to fire the callback for some reason. Am I do something silly or is this broken?
Steps to Reproduce / Code Snippets / Screenshots
Environment