-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
Fix/animated lists types #36292
Fix/animated lists types #36292
Conversation
Hi @jeongshin! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks! |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
Base commit: 81dd3af |
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.
Can we factor this to reuse the imperative methods already defined for VirtualizedList, instead of duplicating this?
I tried to use |
Libraries/Animated/Animated.d.ts
Outdated
SectionListComponent, | ||
SectionListProps, | ||
} from '../Lists/SectionList'; | ||
import {NodeHandle} from '../ReactNative/RendererProxy'; |
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.
NodeHandle
is not in use.
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.
Removed unused type. thank you.
Do you think it is a good idea to make changes only on |
I made changes only on So, I fixed |
@NickGerleman has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
@NickGerleman merged this pull request in ed39d63. |
Summary: I was working on `Animated.FlatList` and found some types missing as below ![Screen Shot 2023-02-25 at 4 32 43 PM](https://user-images.githubusercontent.com/64301935/221345457-74252131-5207-4e17-ad96-92221a915305.png) also `Animated.SectionList` ![Screen Shot 2023-02-25 at 4 31 34 PM](https://user-images.githubusercontent.com/64301935/221345679-07ba862b-708e-400e-ac14-7d2156fcc1e8.png) So I refactored type definition for `Animated.FlatList` and `Animated.SectionList` using `abstract class`. ## Changelog [GENERAL] [FIXED] - add missing FlatList types for Animated FlatList [GENERAL] [FIXED] - add missing SectionList types for Animated SectionList <!-- Help reviewers and the release process by writing your own changelog entry. Pick one each for the category and type tags: [ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message For more details, see: https://reactnative.dev/contributing/changelogs-in-pull-requests --> Pull Request resolved: facebook#36292 Test Plan: Ran `yarn test-typescript` and `yarn test-typescript-offline` with no errors. Reviewed By: lunaleaps Differential Revision: D43673884 Pulled By: NickGerleman fbshipit-source-id: 7ccab5997fa2f22226fb0e106672cee98e568ba4
Summary
I was working on
Animated.FlatList
and found some types missing as belowalso
Animated.SectionList
So I refactored type definition for
Animated.FlatList
andAnimated.SectionList
usingabstract class
.Changelog
[GENERAL] [FIXED] - add missing FlatList types for Animated FlatList
[GENERAL] [FIXED] - add missing SectionList types for Animated SectionList
Test Plan
Ran
yarn test-typescript
andyarn test-typescript-offline
with no errors.