diff options
author | 2018-07-06 02:11:40 +0300 | |
---|---|---|
committer | 2023-01-13 10:37:53 +0300 | |
commit | ea1b9039ae221355cfaabb16fc43dab5917bea56 (patch) | |
tree | 9e9c40a33cfcbd69062dae77a68964929f952368 /vnext/src/components/MessageInput.js | |
parent | 91faf0911184bb430170d021195d008b977e0ac4 (diff) |
Fix eslint warnings
Diffstat (limited to 'vnext/src/components/MessageInput.js')
-rw-r--r-- | vnext/src/components/MessageInput.js | 20 |
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', |