react-native-copilot icon indicating copy to clipboard operation
react-native-copilot copied to clipboard

Not able to see the options once after the scroll

Open Priyankalj opened this issue 6 months ago • 0 comments

useEffect(() => { const handleStepChange = (step) => { const currentOrder = step.order; setTimeout(() => { if (step?.wrapperRef?.current && scrollViewRef.current) { step.wrapperRef.current.measure((x, y, width, height, pageX, pageY) => { const previous = previousOrder.current; if (previous !== null) { let screenHeight = Dimensions.get('window').height; if (currentOrder === 5) { setTimeout(() => {

            scrollViewRef.current.scrollTo({
            y:360,
              animated: true,
            });
          }, 500);
        }
        if (currentOrder === 8) {
          scrollViewRef.current.scrollToEnd({
            animated: true,
          });
        }
      }
      previousOrder.current = currentOrder;
    });
  } else {
    console.warn('wrapperRef not available for step:', step.name);
  }
}, 500); // small delay

};

copilotEvents.on('stepChange', handleStepChange);

return () => { copilotEvents.off('stepChange', handleStepChange); }; }, []);

have used the scrollref with a known height. But , just after the scroll, the tooltip with the message is going out of the screen where i am not able to even select the options Also, the previous option might work, where the tooltip is pointing out to exactly the same view. But just after the scroll, the tooltip is somewhere where it is not even accessible. i have tried all ways, i need some suggesstions to fix this.

Priyankalj avatar May 05 '25 11:05 Priyankalj