--- a/client/src/components/NoteInput.js Wed Sep 05 13:48:10 2018 +0200
+++ b/client/src/components/NoteInput.js Tue Sep 25 02:02:13 2018 +0200
@@ -14,7 +14,7 @@
onEditorChange = (e) => {
this.setState({
- buttonDisabled: e.state.document.length === 0,
+ buttonDisabled: e.value.document === 0,
startedAt: e.startedAt,
finishedAt: e.finishedAt
});
@@ -26,7 +26,7 @@
const raw = this.refs.editor.asRaw();
const html = this.refs.editor.asHtml();
const categories = this.refs.editor.asCategories();
- const marginComment = this.marginComment.value;
+ // const marginComment = this.marginComment.value;
this.props.addNote(this.props.session, {
plain: plain,
@@ -35,7 +35,7 @@
startedAt: this.state.startedAt,
finishedAt: now(),
categories: categories,
- marginComment: marginComment,
+ // marginComment: marginComment,
});
this.refs.editor.clear();
@@ -54,8 +54,8 @@
render() {
return (
<form>
- <div className="editor">
- <div className="editor-left">
+ <div className="editor p-3 mb-3">
+ <div className="editor-left w-100 border-0 pl-3 pb-3 sticky-bottom">
<SlateEditor ref="editor"
onChange={this.onEditorChange}
onEnterKeyDown={this.onAddNoteClick}
@@ -64,15 +64,16 @@
isChecked={this.props.autoSubmit}
isButtonDisabled={this.state.buttonDisabled}
annotationCategories={ this.props.annotationCategories } />
+
</div>
- <div className="editor-right">
- <input type="textarea" className="form-control"
+ {/* <div className="editor-right w-25 pl-2 border-0 sticky-bottom">
+ <input type="textarea" className="form-control h-100"
name="margin"
- placeholder="Enter a margin comment for your note"
+ placeholder="Espace de commentaire pour votre note"
// inputRef={ ref => { this.marginComment = ref; } }
ref={(marginComment) => { this.marginComment = marginComment; }}
/>
- </div>
+ </div> */}
</div>
</form>
);