aboutsummaryrefslogtreecommitdiff
path: root/vnext/src/components/MessageInput.js
diff options
context:
space:
mode:
Diffstat (limited to 'vnext/src/components/MessageInput.js')
-rw-r--r--vnext/src/components/MessageInput.js20
1 files changed, 11 insertions, 9 deletions
diff --git a/vnext/src/components/MessageInput.js b/vnext/src/components/MessageInput.js
index 1260b6fb..0f1fa4be 100644
--- a/vnext/src/components/MessageInput.js
+++ b/vnext/src/components/MessageInput.js
@@ -18,7 +18,7 @@ export default class MessageInput extends React.Component {
to: this.props.data.to || {},
body: this.props.text || '',
attach: ''
- }
+ };
}
handleCtrlEnter = (event) => {
@@ -28,7 +28,9 @@ export default class MessageInput extends React.Component {
}
onSubmit = (event) => {
- if (event.preventDefault) event.preventDefault();
+ if (event.preventDefault) {
+ event.preventDefault();
+ }
const input = this.fileinput.current;
this.props.onSend({
mid: this.state.mid,
@@ -36,20 +38,20 @@ export default class MessageInput extends React.Component {
body: this.state.body,
attach: this.state.attach ? input.files[0] : '',
to: this.state.to
- })
+ });
this.setState({
body: '',
attach: ''
- })
+ });
}
componentDidMount() {
- this.textarea.current.focus()
+ this.textarea.current.focus();
}
textChanged = (event) => {
this.setState({
body: event.target.value
- })
+ });
const el = this.textarea.current;
const offset = el.offsetHeight - el.clientHeight;
const height = el.scrollHeight + offset;
@@ -58,7 +60,7 @@ export default class MessageInput extends React.Component {
attachmentChanged = (event) => {
this.setState({
attach: event.target.value
- })
+ });
}
openfile = () => {
const input = this.fileinput.current;
@@ -89,7 +91,7 @@ export default class MessageInput extends React.Component {
</div>
</div>
</form>
- )
+ );
}
}
@@ -98,7 +100,7 @@ const commentStyle = {
flexDirection: 'column',
width: '100%',
marginTop: '10px'
-}
+};
const inactiveStyle = {
cursor: 'pointer',