Repository navigation
How to show content on top when total content height is less than list height? #321
|
Desired Behavior
Can you do that easily with LegendList? Or do I need a complex custom solution with useLayoutEffect (measure height of items via refs before render)? Same issues exists for FlashList: Shopify/flash-list#773 (unresolved AFAIK) |
Replies: 2 comments 1 reply
|
LegendList does not use See details of these props at: |
|
using initialScrollIndex={data.length - 1} leads to jumpy behavior on inital render and I am not sure this works fine with infinite lists. Using alignItemsAtEnd leads to the problem i initially described. So what I want is like the chat in WhatsApp: infinite scroll + first item render on top + initial scroll is at the end of chat. I don't know if this is feasible with this library yet. |

LegendList does not use
invertedso this is very easy. Just useinitialScrollIndex={data.length - 1}to have it scrolled to the end on mount. Messages show at the top by default, nothing to change there. If you did want to show them at the bottom you could setalignItemsAtEndto true.See details of these props at:
https://www.legendapp.com/open-source/list/api/props/