-
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
0.59.0-rc.0 Flatlist inverted horizontal #23453
Comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
👋 there. I just tested the code on RN 0.59 and this issue is still present: I actually investigated it a bit further and noticed that, by changing the code into:
It becomes more clear that when there is no data this happens: Meaning, when there are no data it seems that the list "skips" an invert. Probably a temp workaround is to never have a 'really' empty data...? And handle the empty item state? We'll look more into this in the next few months |
…zedList when it's inverted (#24167) Summary: Fixes #23453 Fixes #21196 Basically, changes made in #21496 currently breaks behavior of `<VirtualizedList />` and any components that are based on it (`<SectionList />, <FlatList />`). This PR solves both issues listed above. Visual confirmation of the resolved issue: **Vertical, not inverted, not empty** ![image](https://user-images.githubusercontent.com/7837457/55076839-b005d700-5096-11e9-91de-090934cb0129.png) **Vertical, not inverted, empty** ![image](https://user-images.githubusercontent.com/7837457/55076971-fb1fea00-5096-11e9-8d73-5a2d86275da8.png) **Vertical, inverted, not empty** ![image](https://user-images.githubusercontent.com/7837457/55077042-23a7e400-5097-11e9-911f-9dad4d48a578.png) **Vertical, inverted, empty** ![image](https://user-images.githubusercontent.com/7837457/55079957-87351000-509d-11e9-8f1c-b7134f1f43f9.png) **Horizontal, not inverted, not empty** ![image](https://user-images.githubusercontent.com/7837457/55077118-44703980-5097-11e9-94e9-e33d4af436ee.png) **Horizontal, not inverted, empty** ![image](https://user-images.githubusercontent.com/7837457/55077150-52be5580-5097-11e9-9d43-7cb4e983167e.png) **Horizontal, inverted, not empty** ![image](https://user-images.githubusercontent.com/7837457/55077183-623d9e80-5097-11e9-9e8a-1b2468c7b3a9.png) **Horizontal, inverted, empty** ![image](https://user-images.githubusercontent.com/7837457/55080033-af247380-509d-11e9-90ae-1ff656d46dd1.png) [General] [Fixed] - Fixed VirtualizedList, SectionList and FlatList behavior on rendering list headers with inverted prop and zero items Pull Request resolved: #24167 Differential Revision: D14642345 Pulled By: cpojer fbshipit-source-id: b530bbbd57f60e53a976ac5db272ea4b2d2b3e99
🐛 Bug Report
0.59.0-rc.0 Flatlist inverted horizontal with ListFooterComponent or ListHeaderComponent:
when data is empty array and ListFooterComponent or ListHeaderComponent rendering component - the component show on left instead of right.
when adding data - the ListFooterComponent or ListHeaderComponent is ok.
The bug is on iOS and Android.
The bug not happened on 0.58.4 version
Code Example
Code:
Environment
React Native Environment Info:
System:
OS: macOS 10.14.4
CPU: (12) x64 Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
Memory: 100.43 MB / 16.00 GB
Shell: 5.3 - /bin/zsh
Binaries:
Node: 8.11.4 - ~/.nvm/versions/node/v8.11.4/bin/node
Yarn: 1.13.0 - /usr/local/bin/yarn
npm: 6.7.0 - ~/.nvm/versions/node/v8.11.4/bin/npm
SDKs:
iOS SDK:
Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1
Android SDK:
API Levels: 23, 26, 27, 28
Build Tools: 27.0.3, 28.0.2, 28.0.3
System Images: android-24 | Google APIs Intel x86 Atom, android-25 | Google APIs Intel x86 Atom, android-27 | Intel x86 Atom_64, android-27 | Google APIs Intel x86 Atom, android-28 | Google APIs Intel x86 Atom, android-28 | Google APIs Intel x86 Atom_64, android-28 | Google Play Intel x86 Atom, android-28 | Google Play Intel x86 Atom_64
IDEs:
Android Studio: 3.3 AI-182.5107.16.33.5264788
Xcode: 10.1/10B61 - /usr/bin/xcodebuild
npmPackages:
react: ^16.8.1 => 16.8.1
react-native: 0.59.0-rc.0 => 0.59.0-rc.0
npmGlobalPackages:
react-native-create-library: 3.1.2
react-native-git-upgrade: 0.2.7
The text was updated successfully, but these errors were encountered: