@seafile/comment-editor 0.0.1-alpha.22 → 0.0.1-alpha.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -43,7 +43,7 @@ const CommentEditor = _ref => {
|
|
|
43
43
|
onContentChange,
|
|
44
44
|
hiddenComment,
|
|
45
45
|
hiddenUserInfo,
|
|
46
|
-
|
|
46
|
+
closePanel,
|
|
47
47
|
addParticipants
|
|
48
48
|
} = _ref;
|
|
49
49
|
const commentWrapperRef = (0, _react.useRef)();
|
|
@@ -97,8 +97,8 @@ const CommentEditor = _ref => {
|
|
|
97
97
|
})];
|
|
98
98
|
_slate.Transforms.select(editor, _slate.Editor.start(editor, []));
|
|
99
99
|
onContentChange && onContentChange(null);
|
|
100
|
-
|
|
101
|
-
}, [editor, insertContent, addParticipants, userInfo.username, placeholder, onContentChange,
|
|
100
|
+
closePanel && closePanel();
|
|
101
|
+
}, [editor, insertContent, addParticipants, userInfo.username, placeholder, onContentChange, closePanel]);
|
|
102
102
|
const onSubmitByEnterKey = (0, _react.useCallback)(event => {
|
|
103
103
|
if (!_slateReact.ReactEditor.isFocused(editor)) return;
|
|
104
104
|
onSubmit(event);
|
|
@@ -130,7 +130,7 @@ const CommentEditor = _ref => {
|
|
|
130
130
|
const isPreventCancel = isClickOnListContainer || isClickOnCommentEditorContainer || isClickResizeContainer || isSdocContentWrapper;
|
|
131
131
|
if (isPreventCancel) return;
|
|
132
132
|
}
|
|
133
|
-
hiddenComment
|
|
133
|
+
hiddenComment(false);
|
|
134
134
|
if (onContentChange) {
|
|
135
135
|
if (editor.children.find(n => _slate.Node.string(n).trim())) {
|
|
136
136
|
onContentChange((0, _slateToMd.default)(editor.children));
|
|
@@ -26,7 +26,7 @@ const SeafileCommentEditor = _ref => {
|
|
|
26
26
|
onContentChange,
|
|
27
27
|
hiddenUserInfo,
|
|
28
28
|
hiddenComment,
|
|
29
|
-
|
|
29
|
+
closePanel,
|
|
30
30
|
addParticipants,
|
|
31
31
|
// api
|
|
32
32
|
api
|
|
@@ -45,7 +45,7 @@ const SeafileCommentEditor = _ref => {
|
|
|
45
45
|
onContentChange: onContentChange,
|
|
46
46
|
hiddenUserInfo: hiddenUserInfo,
|
|
47
47
|
hiddenComment: hiddenComment,
|
|
48
|
-
|
|
48
|
+
closePanel: closePanel,
|
|
49
49
|
addParticipants: addParticipants
|
|
50
50
|
})));
|
|
51
51
|
};
|