We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: Cannot read property 'length' of undefined, when loading the screen.
Versions: react-native: 0.58.6 react: 16.5.0 react-native-infinite-virtualized-list: 0.1.14
Code
import GiftedListView from 'react-native-infinite-virtualized-list'; onFetch(page = 1, callback, options) { setTimeout(() => { var rows = ['row '+((page - 1) * 3 + 1), 'row '+((page - 1) * 3 + 2), 'row '+((page - 1) * 3 + 3)]; if (page === 3) { callback(rows, { allLoaded: true, // the end of the list is reached }); } else { callback(rows); } }, 1000); // simulating network fetching } renderRowView(rowData) { return ( <TouchableHighlight style={styles.row} underlayColor='#c8c7cc' onPress={() => this._onPress(rowData)} > <Text>{rowData}</Text> </TouchableHighlight> ); } render() { return ( <View> <GiftedListView rowView={this.renderRowView} onFetch={this.onFetch} firstLoader={true} // display a loader for the first fetching pagination={true} // enable infinite scrolling using touch to load more refreshable={true} // enable pull-to-refresh for iOS and touch-to-refresh for Android withSections={false} // enable sections customStyles={{ paginationView: { backgroundColor: '#eee', }, }} refreshableTintColor="blue" keyExtractor={(item, index) => index} // you need this for VirtualizedList /> </View> ); }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
TypeError: Cannot read property 'length' of undefined, when loading the screen.
Versions:
react-native: 0.58.6
react: 16.5.0
react-native-infinite-virtualized-list: 0.1.14
Code
The text was updated successfully, but these errors were encountered: