-
Notifications
You must be signed in to change notification settings - Fork 294
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
fix: item separator issue #845
Conversation
I have signed the CLA! |
Hi @naqvitalha |
I'm facing the same problem, can this PR be merged soon? @naqvitalha |
this PR has been two months now, can we make any progress here? @naqvitalha |
Hi, I'm also facing the same problem @fortmarek @naqvitalha |
I've created a patch from your PR and encountered an issue when the list works with Sticky Headers. Upon further investigation, I believe a slightly different approach may be beneficial. We can make This change provides greater control and customization options when working with the list. Your feedback on this approach is appreciated. Thank you for raising this issue. I can confirm its existence, but I believe it's crucial for us to take some time to carefully consider the best approach for addressing it. ✌️
|
@irion94 Hi, I appreciate your feedback about my PR. But I don't understand your problem. Could you elaborate problem more clearly? |
@Buksirchik, I apologize for not providing more details earlier. To illustrate the issue, I've prepared a basic example that showcases the behavior on the release version of the flashlist and with your patch applied. In addition, I've included a snippet of my Separator component (although I didn't anticipate it causing the problem). I'm not certain if flashlist.main.movbug.item-separator.mov
|
Also I don't understand why do you need it? The main point is that |
@irion94, according to your issue, I'll try to invistigate soon. Thanks for passing more details. Also I want to know, do you have any custom animation in your example? Did you only use |
I'm using
Yes, I agree, It would be better to handle it as it is right now, but if we don't find a way out I'll keep my version 😅 Anyway, please confirm if the problem truly occurs and let me know ✌️ |
@irion94 I confirm the issue. I reproduced it. |
Guys, I've decided to close that PR due to fix isn't good enough. It causes a lot of problem with animations and sticky headers (see problem described by @irion94). It seems the better way to handle separator via renderItem. PS. I'm sorry about long feedback, it took about 1.5 year :( |
Description
Fixes (#633)
Issue summary:
The
ItemSeparatorComponent
doesn't render properly in a case when adding items to the bottom (e.g. infinity scroll). It causes because a separator is rendered at the bottom of the cell and when new data is added, previous items don't render due to memoization.Reviewers’ hat-rack 🎩
Due to the placement of
ItemSeparatorComponent
has been changed from bottom to top, we have to change the leading and trailing items.Instead of these statements:
we should use:
Screenshots or videos (if needed)
Horizontal inverted FlashList (android, iOS)
Screen.Recording.2023-05-14.at.13.53.32.mov
Screen.Recording.2023-05-14.at.14.22.16.mov
Horizontal FlashList (android, iOS)
Screen.Recording.2023-05-14.at.13.54.08.mov
Screen.Recording.2023-05-14.at.14.21.25.mov
Vertical FlashList (android, iOS)
Screen.Recording.2023-05-14.at.13.55.09.mov
Screen.Recording.2023-05-14.at.14.24.02.mov
Vertical inverted FlashList (android, iOS)
Screen.Recording.2023-05-14.at.13.57.40.mov
Screen.Recording.2023-05-14.at.14.24.39.mov
Checklist