stop replacing shortcodes/emoticon in the live NewMessage textarea (#1026)

This commit is contained in:
Devin Howard 2017-01-11 13:56:44 -05:00 committed by GitHub
parent 08109ee5de
commit 42d671c05b

View file

@ -1,6 +1,5 @@
import React, { PropTypes, Component } from 'react'
import { Emoji, Picker } from 'emoji-mart'
import Util from '../../Metamaps/Util'
class NewMessage extends Component {
constructor(props) {
@ -15,10 +14,6 @@ class NewMessage extends Component {
this.setState({ showEmojiPicker: !this.state.showEmojiPicker })
}
textAreaValue = () => {
return Util.addEmoji(this.props.messageText)
}
handleClick = (emoji, event) => {
const { messageText } = this.props
this.props.handleChange({ target: {
@ -44,7 +39,7 @@ class NewMessage extends Component {
<div className="extra-message-options">
<span className="emoji-picker-button" onClick={this.toggleEmojiPicker}><Emoji size={24} emoji="upside_down_face" /></span>
</div>
<textarea value={this.textAreaValue()}
<textarea value={this.props.messageText}
onChange={this.props.handleChange}
{...this.props.textAreaProps}
/>