@seafile/sdoc-editor 2.0.42 → 2.0.43

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.
@@ -48,7 +48,7 @@ const Column = _ref => {
48
48
  setColumnValue(displayValue);
49
49
  });
50
50
  }
51
- }, [editor, element.data, isLongTextColumn]);
51
+ }, [editor, element.data, isLongTextColumn, editor.currentRowIdx]);
52
52
  const [isClicked, setIsClicked] = (0, _react.useState)(false);
53
53
  (0, _react.useEffect)(() => {
54
54
  if (isSelected && !isReadOnly) {
@@ -29,6 +29,7 @@ const DocumentPluginEditor = _ref => {
29
29
  tableId,
30
30
  columns,
31
31
  getColumnCellValue,
32
+ currentRowIdx,
32
33
  tables,
33
34
  getTableById,
34
35
  collaborators,
@@ -55,12 +56,12 @@ const DocumentPluginEditor = _ref => {
55
56
  const {
56
57
  cursors
57
58
  } = document;
58
- newEditor.getColumnCellValue = getColumnCellValue;
59
59
 
60
60
  // insert column
61
61
  newEditor.table_id = tableId;
62
62
  newEditor.columns = columns || [];
63
63
  newEditor.getColumnCellValue = getColumnCellValue;
64
+ newEditor.currentRowIdx = currentRowIdx;
64
65
 
65
66
  // insert table
66
67
  newEditor.tables = tables || [];
@@ -87,8 +88,9 @@ const DocumentPluginEditor = _ref => {
87
88
  (0, _react.useEffect)(() => {
88
89
  validEditor.getColumnCellValue = getColumnCellValue ? getColumnCellValue : null;
89
90
  validEditor.getArticleStyle = getArticleStyle;
91
+ validEditor.currentRowIdx = currentRowIdx;
90
92
  forceUpdate();
91
- }, [forceUpdate, getColumnCellValue, getArticleStyle, validEditor]);
93
+ }, [forceUpdate, getColumnCellValue, getArticleStyle, validEditor, currentRowIdx]);
92
94
  return /*#__PURE__*/_react.default.createElement(_errorBoundary.default, null, !isReadOnly && /*#__PURE__*/_react.default.createElement(_hooks.PluginsProvider, {
93
95
  plugins: [],
94
96
  showComment: false
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seafile/sdoc-editor",
3
- "version": "2.0.42",
3
+ "version": "2.0.43",
4
4
  "private": false,
5
5
  "description": "This is a sdoc editor",
6
6
  "main": "dist/index.js",
@@ -623,5 +623,6 @@
623
623
  "Insert_chart": "插入图表",
624
624
  "Edit_chart": "编辑图表",
625
625
  "Please_complete_the_chart_configuration_first": "请先完成图表配置",
626
+ "chart": "图表",
626
627
  "Image_is_upload_error": "图片上传失败,请删除后重新尝试"
627
628
  }