How to use collapsible with redux state persistence ?
I used this library in my app for collapsible effect with top tab navigation.For that I referred Extra header for tab example .After which I could get a view with header and 3 top tabs ,but the header is not working as collapsible. I'm using redux in my app ,does that affect the collapsible behavior?
const MyProfileTopTab = createMaterialTopTabNavigator(
{
All: {screen: AllTransactions},
Pending: {screen: PendingTransaction},
History: {screen: HistoryTransactions},
},
);
const GroupImageHeader = ({navigation, collapsible}) => {
const {translateY, translateOpacity, translateProgress} = collapsible;
return (
<View
style={{
flex: 1,
justifyContent: 'center',
}}>
<ProfileHeader navigation={navigation} />
</View>
);
};
const collapsibleParams = {
collapsibleComponent: GroupImageHeader,
collapsibleBackgroundStyle: {
height: 200,
backgroundColor: 'white',
disableFadeoutInnerComponent: true,
},
collapsibleForegroundStyle: {
height: 100,
},
};
export default withCollapsibleForTab(MyProfileTopTab, collapsibleParams);
Hm, it should not. And your code looks fine..
Could you specify the version of your react-navigation and react-native?
"react-navigation": "^4.0.10", "react-native": "0.61.2",
Hi, I tested /example with react-navigation v4.0.10 and react-native 0.60.x. And it still works fine.
Perhaps you didn't do this part on your screen?
Sorry about the lack of documentation.
https://github.com/benevbright/react-navigation-collapsible/blob/9671b4bcd263f4839ee85ca88a4f379ff15438b0/example/src/TabChild1Screen.js#L43-L52
Hey, I tried what you suggested in the link above , but still couldn't get the collapsible behavior working. Am I still missing something ?
On Tue, Nov 19, 2019 at 2:14 AM Bright Lee [email protected] wrote:
Hi, I tested /example with react-navigation v4.0.10 and react-native 0.60.x. And it still works fine. Perhaps you didn't do this part on your screen? Sorry about the lack of documentation.
https://github.com/benevbright/react-navigation-collapsible/blob/9671b4bcd263f4839ee85ca88a4f379ff15438b0/example/src/TabChild1Screen.js#L43-L52
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/benevbright/react-navigation-collapsible/issues/92?email_source=notifications&email_token=AJSCVTCH7WP7ULJ2237BTQLQUL5DNA5CNFSM4JOPBPGKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEEL3CWI#issuecomment-555200857, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJSCVTGANCWBG3SIFK7Q6ZDQUL5DNANCNFSM4JOPBPGA .
Hey, I tried what you suggested in the link above , but still couldn't get the collapsible behavior working. The list is displayed in the screen but it's normal scroll is also not working now . Am I still missing something ?
my render() method in child class
const {animatedY, onScroll} = this.props.collapsible;
return ( <AnimatedFlatList style={{flex: 1}} data={this.state.orderList} renderItem={this.renderOrderItem} keyExtractor={(item, index) => String(index)} onScroll={onScroll} _mustAddThis={animatedY} /> );
On Tue, Nov 19, 2019 at 2:14 AM Bright Lee [email protected] wrote:
Hi, I tested /example with react-navigation v4.0.10 and react-native 0.60.x. And it still works fine. Perhaps you didn't do this part on your screen? Sorry about the lack of documentation.
https://github.com/benevbright/react-navigation-collapsible/blob/9671b4bcd263f4839ee85ca88a4f379ff15438b0/example/src/TabChild1Screen.js#L43-L52
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/benevbright/react-navigation-collapsible/issues/92?email_source=notifications&email_token=AJSCVTCH7WP7ULJ2237BTQLQUL5DNA5CNFSM4JOPBPGKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEEL3CWI#issuecomment-555200857, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJSCVTGANCWBG3SIFK7Q6ZDQUL5DNANCNFSM4JOPBPGA .
Hi, sorry for the late reply. Could you confirm you have this one too? https://github.com/benevbright/react-navigation-collapsible/blob/9671b4bcd263f4839ee85ca88a4f379ff15438b0/example/src/TabChild1Screen.js#L58