-
Notifications
You must be signed in to change notification settings - Fork 294
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
#104: Convert onEndReachedThreshold from pixels to ratio #148
#104: Convert onEndReachedThreshold from pixels to ratio #148
Conversation
fixture/src/Twitter.tsx
Outdated
onEndReachedThreshold={0.5} | ||
onEndReached={() => { | ||
console.log("onEndReached"); | ||
}} |
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.
Do we need to add this to the Twitter
example when it serves no purpose here afaict? We already have a PaginatedList
that leverages onEndReached
.
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.
I added it for testing purpose, you're right, PaginatedList
fits better for it 👍
@@ -40,7 +40,7 @@ | |||
"metro-react-native-babel-preset": "^0.66.2", | |||
"react": "17.0.2", | |||
"react-native": "0.66.4", | |||
"recyclerlistview": "3.1.0-beta.5", | |||
"recyclerlistview": "3.1.0-beta.6", |
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.
could you do a search-and-replace for this change? There are other places where recyclerlistview
version is mentioned and they have not been changed (for example in documentation)
f7409f7
to
6b4824b
Compare
@@ -17,7 +17,7 @@ Check out [the Vault project](https://vault.shopify.io/projects/22845) to learn | |||
|
|||
### Adding a package to your project | |||
|
|||
Add the package to your project via `yarn add @shopify/flash-list recyclerlistview@3.1.0-beta.5` and run `pod install` in the `ios` directory. | |||
Add the package to your project via `yarn add @shopify/flash-list recyclerlistview@3.1.0-beta.6` and run `pod install` in the `ios` directory. |
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.
README.md
should also be updated
aadd8e7
to
35d6641
Compare
@@ -40,7 +40,7 @@ | |||
"metro-react-native-babel-preset": "^0.66.2", | |||
"react": "17.0.2", | |||
"react-native": "0.66.4", | |||
"recyclerlistview": "3.1.0-beta.5", | |||
"recyclerlistview": "3.1.0-beta.6", |
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.
There are multiple readme files where version is referenced. Search all and change. It's there in install steps too.
Description
Resolves #104
RecyclerListView uses number of pixels for onEndReachedThreshold (ex: 100). FlatList uses percentage of screen (ex: 0.2). To simplify for a developer using RecyclerFlatList we do this conversion inside the wrapper.
I've added a new prop to
recyclerlistview
to accept relative value. It was not possible to do on the wrapper side.Reviewers’ hat-rack 🎩
Run Twitter example and scroll down to the bottom. Close to the end on 50% of the screen
onEndReached
should appear in the console.Screenshots or videos (if needed)
Checklist