-
Notifications
You must be signed in to change notification settings - Fork 279
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
Re-renders entire view when adding/removing rows #47
Comments
I didn't think about it. Though I think it is possible to render only new rows after adding record at the end of the data, but if a new element is not the last re-render is required, because layouts of rows below the new row changed. |
+1 for this. As and when I update the PS: I do add the data at the end.
|
I had to solve the problem with blinking when deleting an item. Perhaps the solution is suitable for adding items. In SortableList.jsin componentWillReceiveProps method in setState remove rowsLayout
in _renderRows method change "onLayout" prop In Row.jsand I think that it is necessary to add a check in method _onLayout so that the callback does not always work
Perhaps in this solution there are bad consequences, but everything is working correctly for me. |
deleteNote(key) { After this it doesnt renderRow.. data coming in renderRow as undefined.. I am doing anything wrong. but there is a data in the state.todoItemArray.. |
For anyone still looking for a solution to the flash when deleting items: a solution that worked for me was in SortableList.js in componentWillReceiveProps replace the entire setState with: |
…flashing issue (whole list rerender upon minor deeply nested change) appears as discussed in gitim/react-native-sortable-list#47. Will instead attempt to implement a different sortable list library moving forward.
Any chance of seeing this fix in the next release? |
released the fix from #139 |
If I add a new row to
:data
, the entire list view will re-render. Any plans to support just rendering the rows that have changed, as opposed to the entire list view?The text was updated successfully, but these errors were encountered: