Skip to content

Not able to see the options once after the scroll #345

@Priyankalj

Description

@Priyankalj

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions