Not able to see the options once after the scroll

Aperta
#345 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
react-native, typescript
Ambito
mobile

Direzione di ricerca

Inizia riproducendo il problema relativo all’handler useEffect per l’evento stepChange di copilotEvents, concentrandoti su scrollViewRef, wrapperRef e sugli ordini dei passaggi che chiamano scrollTo o scrollToEnd. Verifica che il tooltip rimanga allineato con la view di destinazione dopo lo scorrimento e che le opzioni rimangano accessibili e selezionabili.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
TypeScript
Stelle
2.4k
Fork
425
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di mohebifar/react-native-copilot

Tutte le issue di mohebifar/react-native-copilot

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.