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

Won't rerender row when set datasource at setState #5

Open
xp19870106 opened this issue Mar 31, 2016 · 1 comment
Open

Won't rerender row when set datasource at setState #5

xp19870106 opened this issue Mar 31, 2016 · 1 comment

Comments

@xp19870106
Copy link

After I get new data from network and set the new datasource, the row just rendered the old data not the new ones!

@mdutkin
Copy link

mdutkin commented May 9, 2016

@xp19870106
var ds = new ListView.DataSource({rowHasChanged: (r1, r2) => r1 !== r2});
rowHasChanged makes a decision whether to re-render row or not. maybe this will help you.

I'm also having problems with re-rendering. after I do
this.setState({ dataSource: ds.cloneWithRows(this.wall_posts) });
on successfully fetching data from server, nothing re-renders until i scroll a screen for a little. someone met this bug or I'm doing something wrong?

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

2 participants