@seafile/sdoc-editor 2.0.37-alpg-0.0.3 → 2.0.37-alpg-0.0.5
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.
|
@@ -208,6 +208,7 @@ const Table = _ref => {
|
|
|
208
208
|
}, /*#__PURE__*/_react.default.createElement(_hooks.SettingSelectRangeContext.Provider, {
|
|
209
209
|
value: isSettingSelectRange
|
|
210
210
|
}, /*#__PURE__*/_react.default.createElement(_tableRoot.default, {
|
|
211
|
+
editor: editor,
|
|
211
212
|
columns: columns,
|
|
212
213
|
attributes: attributes
|
|
213
214
|
}, isSelected && /*#__PURE__*/_react.default.createElement(_tableHeader.default, {
|
|
@@ -260,6 +261,7 @@ function renderTable(props) {
|
|
|
260
261
|
const rowHeightList = element.children.map((item, index) => (0, _helpers.getRowHeight)(item, index));
|
|
261
262
|
style.gridAutoRows = rowHeightList.map(item => `minmax(${item}px, auto)`).join(' ');
|
|
262
263
|
return /*#__PURE__*/_react.default.createElement(_tableRoot.default, {
|
|
264
|
+
editor: editor,
|
|
263
265
|
columns: columns,
|
|
264
266
|
attributes: attributes
|
|
265
267
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -13,11 +13,12 @@ var _hooks = require("./hooks");
|
|
|
13
13
|
var _menu = require("../menu");
|
|
14
14
|
const TableRoot = _ref => {
|
|
15
15
|
let {
|
|
16
|
+
editor,
|
|
16
17
|
attributes,
|
|
17
18
|
columns = [],
|
|
18
19
|
children
|
|
19
20
|
} = _ref;
|
|
20
|
-
const editor =
|
|
21
|
+
// const editor = editor || useSlateStatic();
|
|
21
22
|
const readonly = (0, _slateReact.useReadOnly)();
|
|
22
23
|
const tableScrollWrapper = (0, _react.useRef)(null);
|
|
23
24
|
const [scrollLeft, setScrollLeft] = (0, _react.useState)(0);
|
|
@@ -30,6 +31,7 @@ const TableRoot = _ref => {
|
|
|
30
31
|
menuPosition,
|
|
31
32
|
onContextMenu
|
|
32
33
|
} = (0, _hooks.useContextMenu)(tableScrollWrapper);
|
|
34
|
+
console.log(2, editor, editor.width, columns, allWidth);
|
|
33
35
|
return /*#__PURE__*/_react.default.createElement(_hooks.TableRootContext.Provider, {
|
|
34
36
|
value: tableScrollWrapper.current
|
|
35
37
|
}, /*#__PURE__*/_react.default.createElement(_hooks.TableRootScrollLeftContext.Provider, {
|