Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions example/src/MaterialTopTabExample.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,22 @@ const PreAuthScreen = (props: any) => {
);
};

function Tab3() {
return (
<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
<Text>Tab 3</Text>
</View>
);
}

function Tab4() {
return (
<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
<Text>Tab 4</Text>
</View>
);
}

const PostAuthScreen = (props: any) => {
const { Navigator, Screen } = createMaterialTopTabNavigator();
const onLogout = () => {
Expand All @@ -43,6 +59,8 @@ const PostAuthScreen = (props: any) => {
<Screen name="Tab2">
{(props: any) => <Tab2 {...props} onLogout={onLogout} />}
</Screen>
<Screen name="Tab3" component={Tab3} />
<Screen name="Tab4" component={Tab4} />
</Navigator>
</View>
);
Expand Down
3 changes: 3 additions & 0 deletions ios/PagerViewProvider.swift
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ import UIKit
}
} else {
props.currentPage = index
// For non-animated navigation, no scroll events fire, so emit the
// final onPageScroll explicitly to keep consumers in sync.
delegate?.onPageScroll(data: OnPageScrollEventData(position: Double(index), offset: 0))
}
}

Expand Down
Loading