Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

292
Visualizações
How can I reveal an element behind a flatlist and have it interactable in React Native?

I am trying to render an element that is positioned absolutely behind a flatlist and it will be revealed once the user scrolls to the bottom. The issue I am facing is that the element needs to be interactable, and the flatlist root element takes all pointerevents instead of the background element.

const FlatlistOverElement: FC = () => (
  <View style={{ flex: 1, width: '100%' }}>
    <FlatList
      data={data}
      style={{ flexGrow: 1 }}
      ListFooterComponent={() => (
        <View style={{ height: BACKGROUND_ELEMENT_HEIGHT, opacity: 0 }} />
      )}
      renderItem={RenderItem}
    />
    <AbsolutelyPositionedElementBehindFlatList />
  </View>
)

I have tried to remove pointerevents from the flatlist, then the flatlist is not scrollable.

I have tried to set the height of the flatlist smaller, and let the content overflow. This allows the user to interact with the element, but for that part of the screen, the user can not scroll the flatlist.

What other approach can I utilise in order to solve this issue ?

about 4 years ago · Juan Pablo Isaza
2 Respostas
Responde à pergunta

0

You can use zIndex property on the scroll completion. Just provide a higher zIndex value than that of FlatList to absolute component whenever the scroll is completed. zIndex Layout Props

about 4 years ago · Juan Pablo Isaza Relatório

0

Thanks for the suggestions. I ended up using a zIndex to put the interactable content in front of the flatlist when having scrolled to the end, as well as adding snap points on both sides of the element. To prevent the user from half revealing the element and not be able to interact with it.

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda