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

Render glitches when scrolling down #246

Open
vincentsartoko opened this issue Aug 18, 2021 · 0 comments
Open

Render glitches when scrolling down #246

vincentsartoko opened this issue Aug 18, 2021 · 0 comments

Comments

@vincentsartoko
Copy link

I'm making a chat app, but the list jitters when I reach the bottom. Each of the item has dynamic height and width. Here's my code:

React list:
<ReactList itemRenderer={MsgRenderer} length={messages.length} type="variable" />

MsgRenderer:

return (
    <div key={key} className={`chat-box-msg${messages[index].type}`}>
        <span>{messages[index].content}</span>
        <span className="chat-box-msg-ts text-07 text-gray-2">
            {FormatAMPM(messages[index].timestamp)}

            {/* Status when sending */}
            {messages[index].type === 1 && <>&nbsp;&nbsp;{statusSymbols[messages[index].status]}</>}
        </span>
    </div>
);
My.Video.mp4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant