react-native-sortable-list icon indicating copy to clipboard operation
react-native-sortable-list copied to clipboard

Fix list height not readjusting if elements are removed.

Open saulve opened this issue 4 years ago • 1 comments

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: image

After clicking hide, our elements disappeared, however list size hasn't re-adjusted, leaving us with lots of whitespace: image

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.

saulve avatar Apr 28 '20 12:04 saulve

we are having this issue as well

vidmantas0010 avatar Apr 30 '20 14:04 vidmantas0010