chat: fixed this.editor issue introduced in merge

This commit is contained in:
Logan Allen 2020-08-10 19:43:44 -07:00
parent 3660d30cb1
commit 1b0cb6694e

View File

@ -171,26 +171,13 @@ export class ChatInput extends Component {
};
this.closure = closure.bind(this);
setTimeout(this.closure, 2000);*/
this.editor.setValue('');
}
toggleCode() {
if(this.state.code) {
this.setState({ code: false });
this.editor.setOption('mode', MARKDOWN_CONFIG);
this.editor.setOption('placeholder', this.props.placeholder);
} else {
this.setState({ code: true });
this.editor.setOption('mode', null);
this.editor.setOption('placeholder', 'Code...');
}
const value = this.editor.getValue();
// Force redraw of placeholder
if(value.length === 0) {
this.editor.setValue(' ');
this.editor.setValue('');
}
}
@ -209,6 +196,7 @@ export class ChatInput extends Component {
}
render() {
console.log('hi');
const { props, state } = this;
const color = props.ownerContact