Address review comments

s/onClick/onSelect/
This commit is contained in:
Richard van der Hoff 2016-01-06 16:46:29 +00:00
parent 75302b1f97
commit 4624e7a485
2 changed files with 18 additions and 3 deletions

View file

@ -23,9 +23,14 @@ module.exports = React.createClass({
displayName: 'SearchResult',
propTypes: {
// a matrix-js-sdk SearchResult containing the details of this result
searchResult: React.PropTypes.object.isRequired,
// a list of strings to be highlighted in the results
searchHighlights: React.PropTypes.array,
onClick: React.PropTypes.func,
// callback to be called when the user selects this result
onSelect: React.PropTypes.func,
},
render: function() {
@ -48,7 +53,7 @@ module.exports = React.createClass({
}
if (EventTile.haveTileForEvent(ev)) {
ret.push(<EventTile key={eventId+"+"+j} mxEvent={ev} contextual={contextual} highlights={highlights}
onHighlightClick={this.props.onClick}/>)
onHighlightClick={this.props.onSelect}/>)
}
}
return (