summaryrefslogtreecommitdiffstats
path: root/web/react/components/mention.jsx
diff options
context:
space:
mode:
authorReed Garmsen <rgarmsen2295@gmail.com>2015-07-16 09:21:51 -0700
committerReed Garmsen <rgarmsen2295@gmail.com>2015-07-16 09:21:51 -0700
commitcb4cd741a45fc86a7c2d96e61abd65ad4bd728e1 (patch)
tree307261b03cecad2af7bdfeec2453567dcbf7fdd3 /web/react/components/mention.jsx
parent15b90ff72f7db4d611c5c5035e2d8cd310d4deff (diff)
downloadchat-cb4cd741a45fc86a7c2d96e61abd65ad4bd728e1.tar.gz
chat-cb4cd741a45fc86a7c2d96e61abd65ad4bd728e1.tar.bz2
chat-cb4cd741a45fc86a7c2d96e61abd65ad4bd728e1.zip
Code simplification and rebasing
Diffstat (limited to 'web/react/components/mention.jsx')
-rw-r--r--web/react/components/mention.jsx15
1 files changed, 2 insertions, 13 deletions
diff --git a/web/react/components/mention.jsx b/web/react/components/mention.jsx
index f5ca4ce6d..114dc183f 100644
--- a/web/react/components/mention.jsx
+++ b/web/react/components/mention.jsx
@@ -6,19 +6,8 @@ module.exports = React.createClass({
handleClick: function() {
this.props.handleClick(this.props.username);
},
- select: function() {
- this.setState({ isFocused: "mentions-focus" });
- },
- deselect: function() {
- this.setState({ isFocused: "" });
- },
getInitialState: function() {
- if (this.props.isFocus) {
- return { isFocused: "mentions-focus" };
- }
- else {
- return { isFocused: "" };
- }
+ return null;
},
render: function() {
var self = this;
@@ -32,7 +21,7 @@ module.exports = React.createClass({
icon = <span><i className="mention-img fa fa-users fa-2x"></i></span>;
}
return (
- <div className={"mentions-name " + this.state.isFocused} id={this.props.id + "_mentions"} onClick={this.handleClick} onMouseEnter={function(){self.props.handleMouseEnter(self.props.listId)}}>
+ <div className={"mentions-name " + this.props.isFocused} id={this.props.id + "_mentions"} onClick={this.handleClick} onMouseEnter={this.props.handleMouseEnter}>
<div className="pull-left">{icon}</div>
<div className="pull-left mention-align"><span>@{this.props.username}</span><span className="mention-fullname">{this.props.secondary_text}</span></div>
</div>