jasongaare / react-native-walkthrough-tooltip

An inline wrapper for calling out React Native components via tooltip
MIT License
610 stars 182 forks source link

Fix tooltip flicker #195

Open jyaconelli opened 4 months ago

jyaconelli commented 4 months ago

closes #116

Issue

When a tooltip is initially rendered in a location on the screen without enough room, it flickers indefinitely.

Solution

proposed by @tailorem in https://github.com/jasongaare/react-native-walkthrough-tooltip/issues/116#issuecomment-1242298562 The tooltip will only update contentSize when the new size is larger than the previous. This fixes the flickering issue.

DanUnited commented 4 months ago

There is a problem with this solution: When the tooltip contains only one small string (Text), the width and height of the tooltip container are too big and may not be reduced.