-
Notifications
You must be signed in to change notification settings - Fork 326
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
Encountered two children with the same key in channel list #901
Comments
Hey @philippeauriach We have seen this issue previously, and the root cause in most of the cases was the
sort={[
{ last_message_at: -1 },
{ cid: -1 }
]} Please let me know if this helps and works :) |
Hello @vishalnarkhede , we ended up removing the sort and it is working fine. Does the "last_updated" is also updated when a new message is sent in the channel ? |
Hey @philippeauriach yes, thats correct. |
I am closing this issue for now, but let us know if you have any more questions. |
Perfect, thanks for the help ! |
Describe the bug
A user with a lot of channels (> 50) gets weird channels displayed (using
ChannelList
) after scrolling a bit (he reported the bug as "conversation duplicated). Investigating in dev mode, it appears that channels pagination is working weirdly, and returning conversation already present, resulting in duplicates in the displayed list. I added logs in "usePaginatedChannels" line 90 (setNewChannels
) and it shows the duplicated results after having scrolled a bit (starting on the third or fourth call). I tried with a limit of 5, 10 and 30, and everytime I end up with duplicates after having scrolled.Dev environment info (please complete/provide the following information):
(I noticed that if I set an empty sort object, the bug does not appear)
To Reproduce
Steps to reproduce the behavior:
Create an UI using provided chat components, with a user having a lot of channels. Scroll for a bit, in dev mode you'll see the react warnings.
Expected behavior
A clear and concise description of what you expected to happen.
Additional context
Add any other context about the problem here.
Screenshots
If applicable, add screenshots to help explain your problem.
gz#15572
The text was updated successfully, but these errors were encountered: