Not able to see the options once after the scroll

Đang mở
#345 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
react-native, typescript
Lĩnh vực
mobile

Hướng nghiên cứu

Bắt đầu bằng cách tái hiện vấn đề liên quan đến handler useEffect cho sự kiện stepChange của copilotEvents, tập trung vào scrollViewRef, wrapperRef và thứ tự các bước gọi scrollTo hoặc scrollToEnd. Xác nhận rằng tooltip vẫn được căn chỉnh với view mục tiêu sau khi cuộn và các tùy chọn vẫn có thể truy cập và chọn được.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
TypeScript
Star
2.4k
Fork
425
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của mohebifar/react-native-copilot

Tất cả issue của mohebifar/react-native-copilot

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.