This might be too late, but I had this issue today and could solve it with the action
prop, which is triggered when the component finishes rendering (on mount), it did not work when right away triggering updateHeight()
, but it did with the minimal setTimeout()
:
<SwipeableViews
enableMouseEvents
animateHeight
action={(node) => setTimeout(() => node.updateHeight(), 1)}
>
...
</SwipeableViews>
I hope it helps new users, i love this library.