@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.
|
@@ -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 <
|
|
99
|
+
if (ratio < 0.8) {
|
|
100
100
|
setRemarkInfo({
|
|
101
101
|
show: false
|
|
102
102
|
});
|
|
103
103
|
}
|
|
104
104
|
}, {
|
|
105
|
-
threshold:
|
|
105
|
+
threshold: 0.8
|
|
106
106
|
});
|
|
107
107
|
io.observe(cell);
|
|
108
108
|
return function () {
|
package/dist/core/table/index.js
CHANGED
|
@@ -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 () {
|