forked from actualbudget/actual
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🐛 (mobile) scrolling in lists with pull-to-refresh (actualbudget#1706)
- Loading branch information
1 parent
69d689c
commit 8ab4c5b
Showing
4 changed files
with
36 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
packages/desktop-client/src/components/responsive/PullToRefresh.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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', | ||
}, | ||
'& .ptr__children': { | ||
overflow: 'hidden auto', | ||
}, | ||
}), | ||
)} | ||
{...props} | ||
/> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |