Closed kioopi closed 3 years ago
Hi @kioopi can you provide a reproducible demo or a gif/ small video? It's an android or iOS?
Hi @PedroBern
Its really awesome library and your support even makes it cherry on the top. Below is the video of this issue.
https://user-images.githubusercontent.com/1412113/103474073-10768c00-4dc6-11eb-8493-0a7fa4f80d6a.mov
@PedroBern I tried to investigate and it seems when TabView index is changed syncScrollOffsets
is not called somehow. Tried to add manually handling to onIndexChange
const onTabIndexChanged = (nIndex) => {
const {onIndexChange} = tabViewProps;
onIndexChange && onIndexChange(nIndex);
syncScrollOffsets();
};
...
...
...
<TabView
{...tabViewProps}
onIndexChange={onTabIndexChanged}
navigationState={{index, routes}}
renderTabBar={renderTabBar}
/>
Just wanted to help so I tried :)
But this doesn't work properly, it has other side effects it resets current scrolled position of individual Tabs.
This happens only when we set lazy={true} prop
@Janak-Nirmal Thanks you, that is exactly what i was encountering. The blank space above the round images on the second tab.
I'll try to experiment with syncScrollOffsets
and lazy
.
@Janak-Nirmal thanks for the help 👍
This happens only when we set lazy={true} prop , if we set lazy={false} than this doesn't happen.
@kioopi see #19, does it happen if using lazy={false}
?
@PedroBern yes if you set lazy=false than it doesn't happen.
closing in favor of #19
I still having this issue even with lazy={false} please I need her :(
@PedroBern I tried to investigate and it seems when TabView index is changed
syncScrollOffsets
is not called somehow. Tried to add manually handling to onIndexChangeconst onTabIndexChanged = (nIndex) => { const {onIndexChange} = tabViewProps; onIndexChange && onIndexChange(nIndex); syncScrollOffsets(); }; ... ... ... <TabView {...tabViewProps} onIndexChange={onTabIndexChanged} navigationState={{index, routes}} renderTabBar={renderTabBar} />
Just wanted to help so I tried :)
But this doesn't work properly, it has other side effects it resets current scrolled position of individual Tabs.
This happens only when we set lazy={true} prop , if we set lazy={false} than this doesn't happen.
Tried this but the problem still occurs.
I still having this issue even with lazy={false} please I need her :(
Same here :(
related: #26
fixed in v3 👍
Thanks for this library. I am using ^5.0.0-rc.10 and still facing this issue while using onIndexChange.
yeah the issue does still exist on my end though I use the latest version.
Thanks for this library. I am using ^5.0.0-rc.10 and still facing this issue while using onIndexChange.
Same +1
Same +1
Hello,
Got the same bug for flashlist tabs with dynamic height. I have been trying all solutions above but nothing works or is table.
"expo": "~48.0.12", "react-native": "0.71.8", "react-native-collapsible-tab-view": "^6.2.0"
Thank you for your great library!
When I have scrolled down on one tab so that the header is hidden and then change to another tab (via swipe or tap on the tab) that is scrolled all the way to the top, the paddingTop is showing. It would usually be obscured by the header and tabs but the header is shrunk because of the interaction with the previous tab.
Is there known solution for this? Or a canonical approach? Thank you very much for your time.