Animated.FlatList prop contentContainerStyle doesn't handle animated values
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- C++
- Sterne
- 127k
- Forks
- 25.3k
- Ø Merge
- 1 T. 23 Std.
- Gemergte PRs (30 T.)
- 4
Beschreibung
Description
As I noted in the heading, the Animated.FlatList component does not accept animated values for the contentContainerStyle property. It only seems to work for style.
This is not the behaviour one would expect from an animated component and should be changed.
React Native version:
System:
OS: macOS 11.5.2
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Memory: 196.01 MB / 16.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 14.17.6 - /usr/local/opt/node@14/bin/node
Yarn: 1.22.11 - /usr/local/bin/yarn
npm: 6.14.15 - /usr/local/opt/node@14/bin/npm
Watchman: 2021.09.06.00 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.10.2 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: iOS 14.5, DriverKit 20.4, macOS 11.3, tvOS 14.5, watchOS 7.4
Android SDK:
API Levels: 28, 29, 30, 31
Build Tools: 29.0.2, 30.0.2, 31.0.0
System Images: android-30 | Google APIs Intel x86 Atom, android-30 | Google Play Intel x86 Atom
Android NDK: Not Found
IDEs:
Android Studio: Arctic Fox 2020.3.1 Arctic Fox 2020.3.1
Xcode: 12.5.1/12E507 - /usr/bin/xcodebuild
Languages:
Java: 1.8.0_292 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 17.0.2 => 17.0.2
react-native: 0.65.1 => 0.65.1
react-native-macos: Not Found
npmGlobalPackages:
*react-native*: Not Found
Steps To Reproduce
Provide a detailed list of steps that reproduce the issue.
- Add
Animated.FlatListwith some sample data to your app - Try to pass an animated value to
contentContainerStyle
Expected Results
I would expect this to work with one of the animated components, but instead the screen freezes.
Snack, code example, screenshot, or link to a repository:
https://snack.expo.dev/@reichhartd/animated_flatlist-example
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne mit der verknüpften Snack-Reproduktion und untersuche den Einstiegspunkt von Animated.FlatList. Konzentriere dich dabei darauf, wie sich contentContainerStyle von style unterscheidet. Bestätige, dass der animierte Wert den Bildschirm einfrieren lässt, und überprüfe anschließend, dass contentContainerStyle im selben Beispiel animierte Werte akzeptiert, ohne einzufrieren.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- javascript, react-native
- Bereich
- mobile-dev
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100