react-native-sortable-list
react-native-sortable-list copied to clipboard
Fix list height not readjusting if elements are removed.
Say we have a long list like this, and we want to shorten it with a "Hide" button which will pass only half of the data to the list:
After clicking hide, our elements disappeared, however list size hasn't re-adjusted, leaving us with lots of whitespace:
It seems that onLayout
for rows is called only once, so after initial load we don't recalculate list height in _onUpdateLayouts
on line 356. This PR seems to fix this.
we are having this issue as well