callstack / callstack/react-native-pager-view

How I make flatlist with pagerview ?

Ouverte
#561 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub
question
Langage dominant
TypeScript
Étoiles
3.4k
Forks
476
Merge moyen
10 j 21 h
PR mergées (30 j)
2

Description

Hello,

I want a flatlist with header with pagerview but I got this error:

`[Encountered an error while measuring a list's offset from its containing VirtualizedList](https://stackoverflow.com/questions/72178734/encountered-an-error-while-measuring-a-lists-offset-from-its-containing-virtual)`

Code:

```
const renderInnerLists = ({ index }) => {
return (
//the pagerview grows to the height of its content, but it is nested inside of the flat list, and it does not cause the flat list to grow.


i + Math.random(1000).toString()}
numColumns={2}
listKey={(item, index) => 'D' + index.toString() + Math.random(1000).toString()}
contentContainerStyle={
s.myGalsContentStyle
}
showsVerticalScrollIndicator={false}
scrollEnabled={false}
/>


i + Math.random(1000).toString()}
listKey={(item, index) => 'S' + index.toString() + Math.random(1000).toString()}
numColumns={2}
contentContainerStyle={
s.myGalsContentStyle
}
showsVerticalScrollIndicator={false}
scrollEnabled={false}
/>


)
}

return (
item.id + Math.random(1000).toString()}
/>
)
```

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

L’issue ne nomme aucun fichier du dépôt, test ni point d’entrée. Commencez par reproduire l’exemple de FlatList et PagerView imbriqués, puis examinez l’erreur de mesure liée et la structure de composants fournie. Pour que le travail soit considéré comme terminé, il faut une explication confirmée par un maintainer et une configuration fonctionnelle ou une modification du dépôt.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
javascript, react-native
Domaine
mobile
Type d'issue
Bug
Difficulté
3/5
Temps estimé
1-2 jours
Activité
À l'abandon
Clarté
À clarifier
Accessibilité débutants
20/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.