Overlay, Ref to child lost at invisible

Open
#3,141 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
react-native
Domain
mobile

Research direction

Start by reproducing the reported behavior with an Overlay containing a child ref, toggling visibility and logging the ref. Inspect the Overlay behavior around visibility changes; done means the child ref remains available when the Overlay is invisible and returns correctly when it becomes visible again.

Written by the indexing model from the issue text.

Description

component: Overlay

Explain what you did (Required)

I have the carousel from react-native-snap-carousel inside the Overlay. When I try to interface with the carousel over its referenz, its only possible if the overlay is visible.
A similiar problem as https://github.com/react-native-elements/react-native-elements/issues/1567

Expected behavior (Required)

I expected, that the carousel ref always exist not only whe the overlay is shown

Describe the bug (Required)

As soon as the overlay changes to invisible, the ref to the child is set to null

To Reproduce (Required)

Put a child element in an overlay, ref it, console log the ref and change the overlay state from visible to invisible and back

Your Environment (Required):

software version
react-native-elements 2.3.2
react-native 0.62.2
react-native-snap-carousel 3.9.1
Dominant language
MDX
Stars
25.9k
Forks
4.7k
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from react-native-elements/react-native-elements

All issues in react-native-elements/react-native-elements

Similar issues

More Mobile Dev issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.