Skip to content
New issue

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

[error]callback is not a function #82

Open
smk524198002 opened this issue Dec 9, 2016 · 4 comments
Open

[error]callback is not a function #82

smk524198002 opened this issue Dec 9, 2016 · 4 comments

Comments

@smk524198002
Copy link

the warning is like this.

@scazzy
Copy link
Collaborator

scazzy commented Dec 22, 2016

@smk524198002 can you share screenshot or detail of the error?

@bosquig
Copy link

bosquig commented Jan 28, 2017

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"
    />

@bosquig
Copy link

bosquig commented Jan 28, 2017

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)')

@Aavesh11
Copy link

<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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants