Skip to content

Commit

Permalink
feat: progressViewOffset in useCollapsibleScene
Browse files Browse the repository at this point in the history
  • Loading branch information
PedroBern committed Nov 20, 2020
1 parent eba4cab commit 13c444d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,10 @@ Disable scroll for unfocused routes is optional, but prevents weird/delayed anim

Content container style with top padding with the same height as the tab bar + header height.

in#### progressViewOffset

Needed for the loading indicator to show correctly on android.

#### onMomentumScrollBegin

Callback to set `isGliding` to `true`.
Expand Down
4 changes: 4 additions & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ export type CollapsibleScenePropsAndRef = {
contentContainerStyle: {
paddingTop: number;
};
/**
* Needed for the loading indicator to show correctly on android.
*/
progressViewOffset: number;
} & Pick<
CollapsibleContext,
'onMomentumScrollBegin' | 'onScrollEndDrag' | 'onMomentumScrollEnd'
Expand Down
1 change: 1 addition & 0 deletions src/useCollapsibleScene.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ const useCollapsibleScene = <T extends Route>(
contentContainerStyle: {
paddingTop: headerHeight + tabBarHeight,
},
progressViewOffset: headerHeight + tabBarHeight,
...rest,
};
};
Expand Down

0 comments on commit 13c444d

Please sign in to comment.