Skip to content
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

🅱️ Horizontal FlashList Bug (Layout Problem) #781

Closed
2 tasks
sherif-cyber opened this issue Mar 8, 2023 · 0 comments
Closed
2 tasks

🅱️ Horizontal FlashList Bug (Layout Problem) #781

sherif-cyber opened this issue Mar 8, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@sherif-cyber
Copy link

Current behavior

🅱️ Horizontal FlashList Bug (Layout Problem for height)
create Flashlist horizontal with any data try to switch from portrait - landscape - portrait again
you will see thats list height is not updated correctly (cropped!) and sounds cache previous height for landscape

regarding some investigation i made console.log from inside _setFinalDimensions
console.log(this._totalWidth, ' - ', this._totalHeight)
recyclerlistview/dist/reactnative/core/layoutmanager/LayoutManager.js

1250 - 952
530 - 952
500 - 952
500 - 696
❌ 500 - 696 (should back again to correct height 952)

also if you tried that from (onLayout) you will see that width and height not updated correctly
<FlashList onLayout={(event) => { console.warn(event.nativeEvent.layout.width, '-', event.nativeEvent.layout.height) }} horizontal

bug.webm

Expected behavior

List height should be full as it was in beginning before rotate.

To Reproduce

try to switch horizontal flashlist from portrait - landscape - portrait again
you will see list is cropped in height when back again to portrait
you can also check width and height from onLayout to check wrong values.

Platform:

  • iOS
  • Android

Environment

"@shopify/flash-list": "^1.4.1",
"expo": "~47.0.12",

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant