Skip to content

Impossible to set specific height of a FlashList to maintain scroll in case of few items #1504

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

Open
RohovDmytro opened this issue Feb 3, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@RohovDmytro
Copy link

RohovDmytro commented Feb 3, 2025

  1. My list might have a few items.
  2. To make my header animations works I must have have scroll even if there are few items.
  3. Scrolling up in that case will enable my animations to work properly.
  4. The problem when there is only a few items I can't scroll.
  5. I can force the FlashList to keep scroll by adding Header of Footer component with proper height, but it's impossible (?) to maintain its height that when list items are added or removed without isssues with layout. I cant update Header/Footer height after an item is added or removed, but not at the same time.

Basically, I found not way to keep list scrollable even if there are few items.

Another way to describe this is I need to have an ability to make the list scrollable so the scrollable area will match the height of the screen + X specific height.

The goal is to have a scroll tight to animation of the header. Few items => No scroll => Can't collapse header.

@RohovDmytro RohovDmytro added the bug Something isn't working label Feb 3, 2025
@RohovDmytro
Copy link
Author

It can be consider to be related to contentContainerStyle limits:

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