cometchat-uikit-react
cometchat-uikit-react copied to clipboard
CometChat Conversation List Item miss the select state
Describe the problem
Provide a clear and concise description of the issue
What was the expected behavior?
CometChat Conversation List Item miss the conversation select state
Reproduction
Select a conversation from the conversation list The background color of the selected conversation doesn't change.
Environment
cometchat-pro-react-ui-kit 3.0.2-beta1
The problem is this file: src/components/Chats/CometChatConversationListItem/style.js
Using the props.selectedConversation.conversationId
to identify the selected conversation.
However, the props of <CometChatConversationListItem />
in "src/components/Chats/CometChatConversationList/index.js" doesn't provide selectedConversation
.
I added selectedConversation={conversationObj}
and fixed this issue.
const conversationObj = this.filterConversation();
const conversationList = this.state.conversationlist.map(
(conversation, key) => {
return (
<CometChatConversationListItem
key={conversation.conversationId}
conversation={conversation}
loggedInUser={this.loggedInUser}
handleClick={this.handleClick}
actionGenerated={this.actionHandler}
selectedConversation={conversationObj}
/>
);
}
);