Skip to content

Conversation

@deepak0x
Copy link
Contributor

@deepak0x deepak0x commented Jan 24, 2026

This PR fixes a common React warning:

Warning: Each child in a list should have a unique "key" prop

The warning occurred in the ChatInputFormattingToolbar component and was caused by several elements being rendered as part of dynamic lists without providing a unique key prop. This made it harder for React to correctly track and optimize updates to these elements.


Closes #1098

Changes

Updated packages/react/src/views/ChatInput/ChatInputFormattingToolbar.js:

  • Added key="audio" to the AudioMessageRecorder component.
  • Added key="video" to the VideoMessageRecorder component.
  • Replaced empty fragments (<>) with <React.Fragment key={item.name}> for mapped formatting buttons (bold, italic, strike, etc.).

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

Successfully merging this pull request may close these issues.

[Bug]: Missing unique "key" prop in ChatInputFormattingToolbar components

1 participant