deanmcpherson / react-native-sortable-listview

Drag drop capable wrapper of ListView for React Native
MIT License
917 stars 235 forks source link

rerenders when list childern value is changed #41

Closed Mindaugas-Jacionis closed 7 years ago

Mindaugas-Jacionis commented 7 years ago

I have this list used for my apps frontpage widgets(to turn them of and on and to sort). So each row has a switcher. When user clicks switcher its value is changed, therefore rows value is changed as well, therefore it rerenders listview and if user has scrolled - he/she are suddenly brought to the top. I think this might be solvable if listview would be replased by scrollview and rows would be just maped array.

I hope my description is clear, if not - just ask questions. :)

deanmcpherson commented 7 years ago

Hey @Mindaugas-Jacionis, this doesn't sound like standard list view behaviour, do you have any code I can see? We probably won't swap out ListView, as it comes with performance benefits particularly for long lists.

If we were going to swap out the backend, it would have to be configurable.

deanmcpherson commented 7 years ago

Closing due to inactivity.

Mindaugas-Jacionis commented 7 years ago

rowHasChanged prop solved the case.