react-native-pager-view icon indicating copy to clipboard operation
react-native-pager-view copied to clipboard

Seeing a blank screen when I use setPageWithoutAnimation to last page, however as I just move my fingers (left-right) over the screen I see the UI

Open jitenshah19 opened this issue 3 years ago • 7 comments

I am using version 5.1.11 and thank you for this amazing package. I am trying to jump to the last page using ref.current.setPageWithoutAnimation(lastPage)

However, I see a blank screen and if I move my finger little bit (left-right) on the screen it then shows me the UI This happens sometimes and sometimes it works correctly.

Can anyone guide me if I am missing something here.

Thank you.

jitenshah19 avatar Jul 12 '21 14:07 jitenshah19

Hey @jitenshah19 Could you check our example inside the repo ? What platform is affected ?

troZee avatar Jul 14 '21 08:07 troZee

I will try to create a small example if I can because my code is now quite huge.

it's on iOS - we are developing only for iOS

The problem is it works sometimes and it does not work sometimes and to see the UI you just move the finger on the screen here and there and you see the UI

I have one vertical viewpager and inside it, I have a lot of horizontal view pagers. This problem happens on Horizontal View Pager which is a UI with Video/ Image Background.

jitenshah19 avatar Jul 14 '21 09:07 jitenshah19

Ive got the same issue if i pop a modal...

s10mcow avatar Oct 30 '21 23:10 s10mcow

I am seeing the same issue if I have any re-render happen, so if I am using a prop that is say a Redux store variable and it causes a re-render the screen goes blank, but if I swipe left or right the screen is back, something is causing an odd render issues and we really need to know what the cause might be. The modal issue is also there unless we include the modal from within the slide that is shown, just very strange behavior.

johntvogt avatar Nov 03 '21 16:11 johntvogt

Since we did not need that functionality anymore I did not look for a fix.

However, I had other issue where I was deleting the last item in the pager and moving it to the second last but I would see a black screen : I found this fix : https://github.com/callstack/react-native-pager-view/pull/395/commits/071a45f1ba8f1458d5f9f74159287fd50bb0f4ee

I am using react-native-pager-view 5.1.10 on iOS.

Can you check the above patch and see if that helps your case.

jitenshah19 avatar Nov 04 '21 05:11 jitenshah19

For me updating to v6.0.0-rc.1 fixed the problem! Make sure to update your import from default import to: import { PagerView } from 'react-native-pager-view';

dcphi avatar Mar 24 '22 15:03 dcphi

@jitenshah19 Did you manage to solve this problem in the end by patching it like that? As you say "This problem happens on Horizontal View Pager which is a UI with Video/ Image Background." - is exactly what I'm facing. I have a Pager with 4 full background images in it which from time to time pull in a white screen first, after moving it a bit more the actual image show's up.. v6.0.0-rc.1 doesnt run for me, can't test that one.

pimJNGNL avatar Jul 26 '22 18:07 pimJNGNL