Explain why search results are cleared when eventId changes

pull/21833/head
Luke Barnard 2017-06-08 15:38:58 +01:00
parent dca2be6325
commit e58e4db628
1 changed files with 2 additions and 0 deletions

View File

@ -170,6 +170,8 @@ module.exports = React.createClass({
isEventHighlighted: RoomViewStore.isEventHighlighted(),
};
// Clear the search results when clicking a search result (which changes the
// currently scrolled to event, this.state.eventId).
if (this.state.eventId !== newState.eventId) {
newState.searchResults = null;
}