Open smk524198002 opened 7 years ago
@smk524198002 can you share screenshot or detail of the error?
Got the same issue, no more detail. I'll let you know what my code looks like :
async _loadData(page = 1, callback, options) { let response = await fetch(url + page); callback(response.data); }
and in the render return : <GiftedListView rowView={(rowData) => this._renderRow(rowData)} onFetch={this._loadData} firstLoader={true} // display a loader for the first fetching pagination={true} // enable infinite scrolling using touch to load more refreshable={false} // enable pull-to-refresh for iOS and touch-to-refresh for Android withSections={false} // enable sections customStyles={{ paginationView: { backgroundColor: '#eee', }, }}
refreshableTintColor="blue"
/>
ok with this "onFetch={(page, callback, options) => this._loadData(page, callback, options)}" my listview is well rendered. However I still got this error : TypeError: undefined is not a function (evaluating 'callback(responseJson.data)')
<GiftedListView style={{flex:1}} automaticallyAdjustContentInsets={false} rowView={this._renderRow} onFetch={this._loadDataFromNetwork} firstLoader={true} pagination={false} refreshable={true} withSections={false} customStyles={{refreshableView:{backgroundColor: '#FFFFFF'}}} emptyView={this._renderEmptyView} ref="listView"
/>
how to use?
the warning is like this.