Skip to content

Commit b361d22

Browse files
committed
update readme
1 parent d655e05 commit b361d22

2 files changed

Lines changed: 13 additions & 12 deletions

File tree

README.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -82,20 +82,21 @@ export default function App() {
8282

8383
You can customize the swipe refresh spinner look and behavior via the following the props
8484

85-
| Name | Description | Required | Default |
86-
| :---------------------: | :---------------------------------------------------------------------: | :------: | :-----: |
87-
| threshold | Minimum gesture movement displacement before swipe action is registered | false | false |
88-
| onEndRefresh | Callback function triggered on refresh is complete | false | false |
89-
| onStartRefresh | Callback function triggered on refresh start | false | false |
90-
| slingshotDistance | The distance the refresh indicator can be pulled during a swipe gesture | false | false |
91-
| progressViewOffset | The refresh indicator position during refresh | false | false |
92-
| progressStrokeColor | Color of the refresh progress spinner | false | false |
93-
| getScrollTopOverride | Disabled pull to refresh | false | false |
94-
| overrideBrowserRefresh | Override browser pull to refresh behaviour | false | false |
95-
| progressBackgroundColor | Background color of the progress spinner | false | false |
85+
| Name | Description | Required | Default |
86+
| :---------------------: | :---------------------------------------------------------------------: | :------: | :---------------------------------: |
87+
| threshold | Minimum gesture movement displacement before swipe action is registered | false | 10 |
88+
| onEndRefresh | Callback function triggered on refresh is complete | false | - |
89+
| onStartRefresh | Callback function triggered on refresh start | false | - |
90+
| slingshotDistance | The distance the refresh indicator can be pulled during a swipe gesture | false | 60 |
91+
| progressViewOffset | The refresh indicator position during refresh | false | 30 |
92+
| progressStrokeColor | Color of the refresh progress spinner | false | #2755c4 |
93+
| getScrollTopOverride | Disabled pull to refresh | false | document.scrollingElement.scrollTop |
94+
| overrideBrowserRefresh | Override browser pull to refresh behavior | false | true |
95+
| progressBackgroundColor | Background color of the progress spinner | false | #fff |
9696

9797
## Credits
9898

9999
---
100100

101101
- [Take control of your scroll](https://developer.chrome.com/blog/overscroll-behavior/)
102+
- [Material loading spinner](https://codepen.io/jczimm/pen/vEBpoL)

src/SwipeRefreshCoordinator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export interface SwipeRefreshAttributes {
2323
}
2424

2525
// Minimum displacement before swipe is registered. This helps avoid taps being registered as swipes
26-
const DEFAULT_THRESHOLD = 0;
26+
const DEFAULT_THRESHOLD = 10;
2727

2828
// Travel distance to initiate the refresh
2929
const DEFAULT_SLINGSHOT_DISTANCE = 60;

0 commit comments

Comments
 (0)