sheet-happens 0.0.20 → 0.0.21
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.d.ts +5 -0
- package/dist/index.js +26 -8
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +26 -8
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -1769,7 +1769,9 @@ function Sheet(props) {
|
|
|
1769
1769
|
} : _extends({}, sel2);
|
|
1770
1770
|
|
|
1771
1771
|
if (editMode) {
|
|
1772
|
-
|
|
1772
|
+
if (!props.dontCommitEditOnSelectionChange) {
|
|
1773
|
+
commitEditingCell();
|
|
1774
|
+
}
|
|
1773
1775
|
}
|
|
1774
1776
|
|
|
1775
1777
|
var scrollToP2 = true;
|
|
@@ -1794,11 +1796,14 @@ function Sheet(props) {
|
|
|
1794
1796
|
|
|
1795
1797
|
setSelectionInProgress(true);
|
|
1796
1798
|
changeSelection(sel1.x, sel1.y, sel2.x, sel2.y, scrollToP2);
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1799
|
+
|
|
1800
|
+
if (!props.dontCommitEditOnSelectionChange) {
|
|
1801
|
+
setEditCell({
|
|
1802
|
+
x: -1,
|
|
1803
|
+
y: -1
|
|
1804
|
+
});
|
|
1805
|
+
setEditKey('');
|
|
1806
|
+
}
|
|
1802
1807
|
};
|
|
1803
1808
|
|
|
1804
1809
|
var onMouseUp = function onMouseUp(e) {
|
|
@@ -1862,7 +1867,11 @@ function Sheet(props) {
|
|
|
1862
1867
|
changes.push({
|
|
1863
1868
|
x: x,
|
|
1864
1869
|
y: y,
|
|
1865
|
-
value: value
|
|
1870
|
+
value: value,
|
|
1871
|
+
source: {
|
|
1872
|
+
x: x,
|
|
1873
|
+
y: srcY
|
|
1874
|
+
}
|
|
1866
1875
|
});
|
|
1867
1876
|
}
|
|
1868
1877
|
|
|
@@ -1895,7 +1904,11 @@ function Sheet(props) {
|
|
|
1895
1904
|
changes.push({
|
|
1896
1905
|
x: _x3,
|
|
1897
1906
|
y: _y2,
|
|
1898
|
-
value: _value
|
|
1907
|
+
value: _value,
|
|
1908
|
+
source: {
|
|
1909
|
+
x: srcX,
|
|
1910
|
+
y: _y2
|
|
1911
|
+
}
|
|
1899
1912
|
});
|
|
1900
1913
|
}
|
|
1901
1914
|
|
|
@@ -2112,6 +2125,11 @@ function Sheet(props) {
|
|
|
2112
2125
|
|
|
2113
2126
|
var editCell = absCoordianteToCell(x, y, rowSizes, columnSizes);
|
|
2114
2127
|
setArrowKeyCommitMode(false);
|
|
2128
|
+
|
|
2129
|
+
if (editMode) {
|
|
2130
|
+
commitEditingCell();
|
|
2131
|
+
}
|
|
2132
|
+
|
|
2115
2133
|
startEditingCell(editCell);
|
|
2116
2134
|
};
|
|
2117
2135
|
|