-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🐛 (mobile) scrolling in lists with pull-to-refresh #1706
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import React, { type ComponentProps } from 'react'; | ||
import BasePullToRefresh from 'react-simple-pull-to-refresh'; | ||
|
||
import { css } from 'glamor'; | ||
|
||
type PullToRefreshProps = ComponentProps<typeof BasePullToRefresh>; | ||
|
||
export default function PullToRefresh(props: PullToRefreshProps) { | ||
return ( | ||
<div style={{ overflow: 'auto' }}> | ||
<BasePullToRefresh | ||
pullDownThreshold={80} | ||
resistance={2} | ||
className={String( | ||
css({ | ||
'& .ptr__pull-down': { | ||
textAlign: 'center', | ||
}, | ||
Comment on lines
+16
to
+18
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Centers the "pull down to refresh" label that is visible before the refresh starts |
||
'& .ptr__children': { | ||
overflow: 'hidden auto', | ||
}, | ||
Comment on lines
+19
to
+21
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is the main fix.. a bit hacky.. but I couldn't figure out anything better sadly. |
||
}), | ||
)} | ||
{...props} | ||
/> | ||
</div> | ||
); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
category: Bugfix | ||
authors: [MatissJanis] | ||
--- | ||
|
||
Mobile: fix transaction list scrolling requiring a previous interaction before scroll happens |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Increasing the resistance a bit in order to make it more difficult to refresh accidentally