Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blank Tab Content with initialPage value 1 #762

Closed
ishita-kothari opened this issue Oct 6, 2017 · 22 comments
Closed

Blank Tab Content with initialPage value 1 #762

ishita-kothari opened this issue Oct 6, 2017 · 22 comments

Comments

@ishita-kothari
Copy link

Hello,

I have 2 tabs in my react-native app. First tab has "favourite" content and Second tab has "All" content. When the array of "favourite" content is empty, I need to show "All" contents. For this I am using initialPage={1}. I can see the active tab, but the content is not visible. I just see blank screen.

If I scroll to tab 0 and then scroll back to tab 1, the content is visible. I tried every solution provided in few issues but didn't find any luck. Can anyone please help?

Thanks!

@SupriyaKalghatgi
Copy link

+1

@syzer
Copy link

syzer commented Oct 10, 2017

also React.createClass is deprecated to it needs a bit of face lifting :)

@koansang
Copy link

koansang commented Oct 13, 2017

+1 only iOS, Android is show.

@syzer
Copy link

syzer commented Oct 13, 2017

Did you try prerenderingSiblingsNumber={1}?

@hjumeau
Copy link

hjumeau commented Oct 19, 2017

+1 on IOS, use prerenderingSiblingsNumber={1} doesn't fix the problem.

@luco
Copy link

luco commented Oct 24, 2017

Any updates? Can't use this yet.

@syzer
Copy link

syzer commented Oct 24, 2017

Would fix it but current maintainer @skv-headless is gone missing :D
So all it would is 36 open PR's => 37 open PR's.

@antoinerousseau
Copy link

maybe @brentvatne can help along with @skv-headless ?

@syzer
Copy link

syzer commented Oct 29, 2017

The next week, I might have couple hour to drill to that.. but no promises on that.
We had performance issues with tab switching 7.4 so we need to come back to this package :D

@antoinerousseau
Copy link

antoinerousseau commented Oct 30, 2017

I switched to react-native-tab-view but thanks anyway

@skv-headless
Copy link
Collaborator

@skv-headless
Copy link
Collaborator

close for #750

@ghost
Copy link

ghost commented Nov 20, 2017

I have the same problem with iOS. What is the solution to resolved this issues?

@SupriyaKalghatgi
Copy link

@syzer When can we expect fix for this

@syzer
Copy link

syzer commented Nov 20, 2017

currently not working on this issue

@kubilaytural
Copy link

Try this. It worked. Ideal for changing first pages.

componentDidMount() {
setTimeout(() => this.scrollableTabView.goToPage(1), 300);
}
...
.....
...
<ScrollableTabView
ref={(ref) => { this.scrollableTabView = ref; }}

@Balasnest
Copy link

Issue is still there. This make me to move out from the lib. Any solution for this?

@syzer
Copy link

syzer commented Apr 18, 2018

@Balasnest did you try @kubilaytural solution or|and using prerenderingSiblingsNumber={1} ?

@Balasnest
Copy link

@syzer Yes. @kubilaytural solution is helped me.

@Balasnest
Copy link

@syzer Most of the time data is not loading. Very rarely its working out. I guess settimeout is not working exactly. How can resolve this?

@syzer
Copy link

syzer commented Apr 20, 2018

have you tried using react timing functions?
or does bigger timeout help ? if so you could patch it

to be honest i'm not sure how i patched it 😄 it was august last year or so :)

you could also try this replacement:
https://www.npmjs.com/package/react-native-scrollable-tab-view-fix

@hanzoow
Copy link

hanzoow commented Jun 19, 2021

Try this. It worked. Ideal for changing first pages.

componentDidMount() {
setTimeout(() => this.scrollableTabView.goToPage(1), 300);
}
...
.....
...
<ScrollableTabView
ref={(ref) => { this.scrollableTabView = ref; }}

ty, fixed the problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests