@zhenliang/sheet 0.1.7-3.beta.10 → 0.1.7-3.beta.11

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.
@@ -386,6 +386,7 @@ span.harvest-sheet-container:focus {
386
386
  z-index: 10;
387
387
  margin-left: 5px;
388
388
  overflow: auto;
389
+ scroll-behavior: smooth;
389
390
  padding: 0;
390
391
  background: rgb(255,255,255);
391
392
  box-shadow: 0 4px 8px rgba(216,223,235,.5);
@@ -96,13 +96,13 @@ export var useRemarkContainer = function useRemarkContainer(elementRef, start, e
96
96
  }
97
97
  var io = new IntersectionObserver(function (entries) {
98
98
  var ratio = entries[0].intersectionRatio;
99
- if (ratio < 1) {
99
+ if (ratio < 0.8) {
100
100
  setRemarkInfo({
101
101
  show: false
102
102
  });
103
103
  }
104
104
  }, {
105
- threshold: 1
105
+ threshold: 0.8
106
106
  });
107
107
  io.observe(cell);
108
108
  return function () {
@@ -87,7 +87,6 @@ var Table = function Table(_ref) {
87
87
  var toRow = flatDataSource.findIndex(function (d) {
88
88
  return String(d === null || d === void 0 ? void 0 : d.id) === String(id);
89
89
  });
90
- console.log(sheetInstance.current, data, flatDataSource, toRow, toCol);
91
90
  (_sheetInstance$curren = sheetInstance.current) === null || _sheetInstance$curren === void 0 || _sheetInstance$curren.goTo(toRow, toCol);
92
91
  (_sheetInstance$curren2 = sheetInstance.current) === null || _sheetInstance$curren2 === void 0 || _sheetInstance$curren2.select({
93
92
  start: {
@@ -104,7 +103,7 @@ var Table = function Table(_ref) {
104
103
  return (_sheetInstance$curren3 = sheetInstance.current) === null || _sheetInstance$curren3 === void 0 ? void 0 : _sheetInstance$curren3[property];
105
104
  }
106
105
  });
107
- }, [columns, dataSource]);
106
+ }, [columns, dataSource, offset]);
108
107
  var _useRowSelection = useRowSelection(dataSource, rowSelection, hasChildren),
109
108
  _useRowSelection2 = _slicedToArray(_useRowSelection, 2),
110
109
  checkedRow = _useRowSelection2[0],
@@ -241,6 +240,7 @@ var Table = function Table(_ref) {
241
240
  columnKey: columnKey,
242
241
  id: data === null || data === void 0 || (_data$row = data[row]) === null || _data$row === void 0 || (_data$row = _data$row[col]) === null || _data$row === void 0 || (_data$row = _data$row.record) === null || _data$row === void 0 ? void 0 : _data$row.id
243
242
  });
243
+ console.log(data);
244
244
  setShowRemark(!!(data !== null && data !== void 0 && (_data$row2 = data[row]) !== null && _data$row2 !== void 0 && (_data$row2 = _data$row2[col]) !== null && _data$row2 !== void 0 && (_data$row2 = _data$row2.record) !== null && _data$row2 !== void 0 && (_data$row2 = _data$row2.remarks) !== null && _data$row2 !== void 0 && _data$row2.includes(columnKey)));
245
245
  }, [offset, columns, data]);
246
246
  var remarkElement = useMemo(function () {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zhenliang/sheet",
3
- "version": "0.1.73.beta.10",
3
+ "version": "0.1.73.beta.11",
4
4
  "description": "A react library developed with dumi",
5
5
  "license": "MIT",
6
6
  "module": "dist/index.js",