@leankylin-sheet/react 5.2.37 → 5.2.38
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.
- package/dist/index.esm.js +11 -3
- package/dist/index.js +11 -3
- package/dist/index.umd.js +11 -3
- package/dist/index.umd.min.js +1 -1
- package/package.json +3 -3
package/dist/index.esm.js
CHANGED
|
@@ -1165,6 +1165,7 @@ var InputBox = function InputBox() {
|
|
|
1165
1165
|
var row_index = firstSelection === null || firstSelection === void 0 ? void 0 : firstSelection.row_focus;
|
|
1166
1166
|
var col_index = firstSelection === null || firstSelection === void 0 ? void 0 : firstSelection.column_focus;
|
|
1167
1167
|
var preText = useRef("");
|
|
1168
|
+
var prevCellRef = useRef();
|
|
1168
1169
|
useLayoutEffect(function () {
|
|
1169
1170
|
if (!context.allowEdit) {
|
|
1170
1171
|
setContext(function (ctx) {
|
|
@@ -1181,11 +1182,18 @@ var InputBox = function InputBox() {
|
|
|
1181
1182
|
delete refs.globalCache.doNotUpdateCell;
|
|
1182
1183
|
return;
|
|
1183
1184
|
}
|
|
1184
|
-
if (_.isEqual(prevCellUpdate, context.luckysheetCellUpdate) && prevSheetId === context.currentSheetId) {
|
|
1185
|
-
return;
|
|
1186
|
-
}
|
|
1187
1185
|
var flowdata = getFlowdata(context);
|
|
1188
1186
|
var cell = flowdata === null || flowdata === void 0 ? void 0 : (_flowdata$row_index = flowdata[row_index]) === null || _flowdata$row_index === void 0 ? void 0 : _flowdata$row_index[col_index];
|
|
1187
|
+
var selectionChanged = !_.isEqual(prevCellUpdate, context.luckysheetCellUpdate) || prevSheetId !== context.currentSheetId;
|
|
1188
|
+
var cellChanged = !prevCellRef.current || prevCellRef.current.r !== row_index || prevCellRef.current.c !== col_index || prevCellRef.current.cell !== cell;
|
|
1189
|
+
if (!selectionChanged && !cellChanged) {
|
|
1190
|
+
return;
|
|
1191
|
+
}
|
|
1192
|
+
prevCellRef.current = {
|
|
1193
|
+
r: row_index,
|
|
1194
|
+
c: col_index,
|
|
1195
|
+
cell: cell
|
|
1196
|
+
};
|
|
1189
1197
|
var value = "";
|
|
1190
1198
|
if (cell && !refs.globalCache.overwriteCell) {
|
|
1191
1199
|
if (isInlineStringCell(cell)) {
|
package/dist/index.js
CHANGED
|
@@ -1175,6 +1175,7 @@ var InputBox = function InputBox() {
|
|
|
1175
1175
|
var row_index = firstSelection === null || firstSelection === void 0 ? void 0 : firstSelection.row_focus;
|
|
1176
1176
|
var col_index = firstSelection === null || firstSelection === void 0 ? void 0 : firstSelection.column_focus;
|
|
1177
1177
|
var preText = React.useRef("");
|
|
1178
|
+
var prevCellRef = React.useRef();
|
|
1178
1179
|
React.useLayoutEffect(function () {
|
|
1179
1180
|
if (!context.allowEdit) {
|
|
1180
1181
|
setContext(function (ctx) {
|
|
@@ -1191,11 +1192,18 @@ var InputBox = function InputBox() {
|
|
|
1191
1192
|
delete refs.globalCache.doNotUpdateCell;
|
|
1192
1193
|
return;
|
|
1193
1194
|
}
|
|
1194
|
-
if (___default['default'].isEqual(prevCellUpdate, context.luckysheetCellUpdate) && prevSheetId === context.currentSheetId) {
|
|
1195
|
-
return;
|
|
1196
|
-
}
|
|
1197
1195
|
var flowdata = core.getFlowdata(context);
|
|
1198
1196
|
var cell = flowdata === null || flowdata === void 0 ? void 0 : (_flowdata$row_index = flowdata[row_index]) === null || _flowdata$row_index === void 0 ? void 0 : _flowdata$row_index[col_index];
|
|
1197
|
+
var selectionChanged = !___default['default'].isEqual(prevCellUpdate, context.luckysheetCellUpdate) || prevSheetId !== context.currentSheetId;
|
|
1198
|
+
var cellChanged = !prevCellRef.current || prevCellRef.current.r !== row_index || prevCellRef.current.c !== col_index || prevCellRef.current.cell !== cell;
|
|
1199
|
+
if (!selectionChanged && !cellChanged) {
|
|
1200
|
+
return;
|
|
1201
|
+
}
|
|
1202
|
+
prevCellRef.current = {
|
|
1203
|
+
r: row_index,
|
|
1204
|
+
c: col_index,
|
|
1205
|
+
cell: cell
|
|
1206
|
+
};
|
|
1199
1207
|
var value = "";
|
|
1200
1208
|
if (cell && !refs.globalCache.overwriteCell) {
|
|
1201
1209
|
if (core.isInlineStringCell(cell)) {
|
package/dist/index.umd.js
CHANGED
|
@@ -106196,6 +106196,7 @@
|
|
|
106196
106196
|
var row_index = firstSelection === null || firstSelection === void 0 ? void 0 : firstSelection.row_focus;
|
|
106197
106197
|
var col_index = firstSelection === null || firstSelection === void 0 ? void 0 : firstSelection.column_focus;
|
|
106198
106198
|
var preText = React.useRef("");
|
|
106199
|
+
var prevCellRef = React.useRef();
|
|
106199
106200
|
React.useLayoutEffect(function () {
|
|
106200
106201
|
if (!context.allowEdit) {
|
|
106201
106202
|
setContext(function (ctx) {
|
|
@@ -106212,11 +106213,18 @@
|
|
|
106212
106213
|
delete refs.globalCache.doNotUpdateCell;
|
|
106213
106214
|
return;
|
|
106214
106215
|
}
|
|
106215
|
-
if (lodash.isEqual(prevCellUpdate, context.luckysheetCellUpdate) && prevSheetId === context.currentSheetId) {
|
|
106216
|
-
return;
|
|
106217
|
-
}
|
|
106218
106216
|
var flowdata = getFlowdata(context);
|
|
106219
106217
|
var cell = flowdata === null || flowdata === void 0 ? void 0 : (_flowdata$row_index = flowdata[row_index]) === null || _flowdata$row_index === void 0 ? void 0 : _flowdata$row_index[col_index];
|
|
106218
|
+
var selectionChanged = !lodash.isEqual(prevCellUpdate, context.luckysheetCellUpdate) || prevSheetId !== context.currentSheetId;
|
|
106219
|
+
var cellChanged = !prevCellRef.current || prevCellRef.current.r !== row_index || prevCellRef.current.c !== col_index || prevCellRef.current.cell !== cell;
|
|
106220
|
+
if (!selectionChanged && !cellChanged) {
|
|
106221
|
+
return;
|
|
106222
|
+
}
|
|
106223
|
+
prevCellRef.current = {
|
|
106224
|
+
r: row_index,
|
|
106225
|
+
c: col_index,
|
|
106226
|
+
cell: cell
|
|
106227
|
+
};
|
|
106220
106228
|
var value = "";
|
|
106221
106229
|
if (cell && !refs.globalCache.overwriteCell) {
|
|
106222
106230
|
if (isInlineStringCell(cell)) {
|