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

inverted option causing sticky headers, ListEmptyComponent to appear inverted, and causing scroll direction to be inverted on web #1511

Open
3 tasks done
mtourj opened this issue Feb 10, 2025 · 2 comments · May be fixed by #1487
Labels
bug Something isn't working

Comments

@mtourj
Copy link

mtourj commented Feb 10, 2025

Current behavior

Currently, enabling inverted on FlashList causes three issues:

  • Sticky headers appear inverted (upside down)
  • ListEmptyComponent appears inverted
  • Scroll direction is inverted on web

I've created a pull request #1487 that resolves these issues.

Expected behavior

I expect inverted to work the same way it does in regular FlatLists, without inverting the rendered content in sticky headers and empty components, and without inverting the scroll direction in browsers.

To Reproduce

Simply set inverted on a FlashList, and set sticky headers or ListEmptyComponent, and observe that they are rendered upside-down. And on the web, your scroll direction will be inverted.

Platform:

  • iOS
  • Android
  • Web

Environment

Latest

@mtourj mtourj added the bug Something isn't working label Feb 10, 2025
@mtourj mtourj changed the title inverted option causing sticky headers, ListEmptyComponent to appear inverted, and causing scroll direction to be inverted on web inverted option causing sticky headers, ListEmptyComponent to appear inverted, and causing scroll direction to be inverted on web Feb 10, 2025
@qalqi
Copy link

qalqi commented Feb 21, 2025

yes! I am also facing the same issue. Here is a demo snack showing the error
https://snack.expo.dev/@qalqi/flashlist-inverted-scroll-issue

Mouse Scroll direction is inverted on web

@obibring
Copy link

obibring commented Mar 9, 2025

In the interim, this fixes the issue for me with regards to sticky headres:

style={
  transform: [{
    scaleY: -1,
   }],
}

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
3 participants