Closed NancyZY closed 8 years ago
Hi @NancyZY,
If you wanted the order to persist through restarting the app, you will need to use AsyncStorage. It would look something like this https://gist.github.com/deanmcpherson/83d22b894292a7718004d280cb4b9765
@deanmcpherson ,Thank you very much. It helps me a lot. And I still have a question , Why I am work with DataSource, renderRow will cannot get the row parameter, when I debugger the code ,I found it direct to dataSource: ``` new ListView.DataSource({ rowHasChanged: (row1, row2) => row1 !== row2, }),
Does the renderRow perform after setState for DataSource? In my opinion, I don't think it could be . perhaps my code was wrong in somewhere
Hey @NancyZY, sorry, I'm not sure what you're asking here.
There are some issues for the projects: 1) run your persistedExample.js , the app will 'remember' the status of changed list, That's alright. But it will not drag and drop correctly, you can try it .
2)Another problem is : when data put in the ListView , then like your persistedExample.js to save the data ,but in renderRow will killed , renderRow={row =>
Fixed in update.
with Example.js, It is well done work. but I have a problem ,how to save status for draged listview. In another word, when I quit the app and then enter the app again ,I can see last draged ListView.I konw it may need to AsyncStorage to save the sorted ListView, but how in Example.js ? Hope you give me some advice