Question: How to scroll to specific message?
cesarve77 opened this issue · comments
CESAR RAMOS commented
Monish Prakasan commented
I want to know this too
hemanthrajuv commented
I want to know this too
emregudur commented
Hi, you can use focus property in message model, pls don't forget add onMessageFocused function on MessageList component.
state = {
messageList: [...]
}
.
.
.
focusMessage(index) {
this.state.messageList[index].focus = true;
this.setState(this.state);
}
.
.
.
<MessageList
onMessageFocused={(x) => console.log(x)}
dataSource={this.state.messageList}
/>
Monish Prakasan commented
quick question, can this work with react function hooks? or do I HAVE to use classes?