Skip to content

Commit

Permalink
Fix scroll bar in middle of screen issue for SceneWrapper ScrollView
Browse files Browse the repository at this point in the history
  • Loading branch information
samholmes committed Jan 17, 2024
1 parent c61f51b commit 0ed050f
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,11 @@ exports[`CreateWalletAccountSelect renders 1`] = `
}
onScroll={[Function]}
scrollEventThrottle={0.0001}
scrollIndicatorInsets={
{
"right": 1,
}
}
style={
{
"height": 1334,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,11 @@ exports[`CurrencyNotificationComponent should render with loading props 1`] = `
}
onScroll={[Function]}
scrollEventThrottle={0.0001}
scrollIndicatorInsets={
{
"right": 1,
}
}
style={
{
"height": 1334,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,11 @@ exports[`CurrencySettings should render 1`] = `
}
onScroll={[Function]}
scrollEventThrottle={0.0001}
scrollIndicatorInsets={
{
"right": 1,
}
}
style={
{
"height": 1334,
Expand Down
10 changes: 10 additions & 0 deletions src/__tests__/scenes/__snapshots__/SettingsScene.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,11 @@ exports[`MyComponent should render Locked SettingsOverview 1`] = `
}
onScroll={[Function]}
scrollEventThrottle={0.0001}
scrollIndicatorInsets={
{
"right": 1,
}
}
style={
{
"height": 1334,
Expand Down Expand Up @@ -3626,6 +3631,11 @@ exports[`MyComponent should render UnLocked SettingsOverview 1`] = `
}
onScroll={[Function]}
scrollEventThrottle={0.0001}
scrollIndicatorInsets={
{
"right": 1,
}
}
style={
{
"height": 1334,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,11 @@ exports[`TransactionDetailsScene should render 1`] = `
}
onScroll={[Function]}
scrollEventThrottle={0.0001}
scrollIndicatorInsets={
{
"right": 1,
}
}
style={
{
"height": 1334,
Expand Down Expand Up @@ -1954,6 +1959,11 @@ exports[`TransactionDetailsScene should render with negative nativeAmount and fi
}
onScroll={[Function]}
scrollEventThrottle={0.0001}
scrollIndicatorInsets={
{
"right": 1,
}
}
style={
{
"height": 1334,
Expand Down
2 changes: 2 additions & 0 deletions src/components/common/SceneWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,8 @@ export function SceneWrapper(props: SceneWrapperProps): JSX.Element {
keyboardShouldPersistTaps={keyboardShouldPersistTaps}
contentContainerStyle={insetStyle}
onScroll={hasTabs || hasHeader ? handleScroll : () => {}}
// Fixes middle-floating scrollbar issue
scrollIndicatorInsets={{ right: 1 }}
>
<MaybeView when={!scroll && !avoidKeyboard} style={[styles.sceneContainer, layoutStyle, insetStyle, { padding }]}>
{isFuncChildren ? children(info) : children}
Expand Down

0 comments on commit 0ed050f

Please sign in to comment.