sheet-happens 0.0.14 → 0.0.16

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.
@@ -397,6 +397,11 @@ function findApproxMaxEditDataIndex(editData) {
397
397
  }
398
398
 
399
399
  x += growthIncrement;
400
+
401
+ if (x > maxSearchableRowOrCol) {
402
+ break;
403
+ }
404
+
400
405
  growthIncrement = Math.floor(growthIncrement * growthIncrementFactor);
401
406
  }
402
407
 
@@ -421,6 +426,11 @@ function findApproxMaxEditDataIndex(editData) {
421
426
  }
422
427
 
423
428
  y += growthIncrement;
429
+
430
+ if (y > maxSearchableRowOrCol) {
431
+ break;
432
+ }
433
+
424
434
  growthIncrement = Math.floor(growthIncrement * growthIncrementFactor);
425
435
  }
426
436
 
@@ -1473,16 +1483,17 @@ function Sheet(props) {
1473
1483
  dx2 = selection.x1;
1474
1484
  }
1475
1485
 
1476
- var max = findApproxMaxEditDataIndex(editData);
1477
-
1478
1486
  if (dx1 === -1 && dx2 === -1) {
1487
+ var max = findApproxMaxEditDataIndex(editData);
1479
1488
  dx1 = 0;
1480
1489
  dx2 = max.x;
1481
1490
  }
1482
1491
 
1483
1492
  if (dy1 === -1 && dy2 === -1) {
1493
+ var _max = findApproxMaxEditDataIndex(editData);
1494
+
1484
1495
  dy1 = 0;
1485
- dy2 = max.y;
1496
+ dy2 = _max.y;
1486
1497
  }
1487
1498
 
1488
1499
  var cptext = '';
@@ -1551,6 +1562,7 @@ function Sheet(props) {
1551
1562
  setEditCell(editCell);
1552
1563
  setEditKey(editDataKey);
1553
1564
  setEditValue(val);
1565
+ setShiftKeyDown(false);
1554
1566
  };
1555
1567
 
1556
1568
  var onScroll = function onScroll(e) {
@@ -1675,9 +1687,9 @@ function Sheet(props) {
1675
1687
  if (selection.x1 === -1 && selection.x2 === -1 && selection.y1 !== -1 && selection.y2 !== -1) {
1676
1688
  var _min = Math.min(selection.y1, selection.y2);
1677
1689
 
1678
- var _max = Math.max(selection.y1, selection.y2);
1690
+ var _max2 = Math.max(selection.y1, selection.y2);
1679
1691
 
1680
- for (var _i5 = _min; _i5 <= _max; _i5++) {
1692
+ for (var _i5 = _min; _i5 <= _max2; _i5++) {
1681
1693
  _indices.push(_i5);
1682
1694
  }
1683
1695
  }