Skip to content

Flatlist content flicker when 2-3 message #951

@sandeepsuthar

Description

@sandeepsuthar

Describe the bug
Creating chat screen with KeyboardAvoidingView and it's working fine with large data but if user has 2-3 messages then flicker content.

Code snippet
`
const ChatListView = (props: Props) => {
const { messages, onSendMessage } = props;
const headerHeight = useHeaderHeight();
const { bottom } = useSafeAreaInsets()
const ref = useRef(null);

return (
<>
<KeyboardAvoidingView
behavior={'translate-with-padding'}
keyboardVerticalOffset={headerHeight}
style={styles.container}
testID="flat-list.container"
>
{
messages.length > 0 ?

:
}


</>
);
}
`
Repo for reproducing
You can test example given by team with 2-3 messages only.

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots

Simulator.Screen.Recording.-.iPhone.16.Pro.-.2025-05-21.at.21.53.28.mp4

Smartphone (please complete the following information):

  • Desktop OS: [MacOS 15.1.1]
  • Device: [e.g. iPhone13]
  • OS: [e.g. iOS 18.4.1]
  • RN version: [e.g. 0.73.6]
  • RN architecture: [paper/fabric]
  • JS engine: [Hermes]
  • Library version: [e.g. 1.17.2]

Metadata

Metadata

Assignees

Labels

KeyboardAvoidingView 🧪Anything related to KeyboardAvoidingView componentKeyboardChatScrollView 💬Anything about chat functionalityquestionYou wanted to clarify something about the usage of the library or have a question about somethingrepro providedIssue contains reproduction repository/code

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions