Skip to content

Render glitches when scrolling down #246

Description

@vincentsartoko

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions