@zhenliang/sheet 0.2.5-beta.11 → 0.2.5-beta.12
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/core/editor/InputOptionsEditor/index.js +2 -1
- package/dist/core/editor/InputOptionsEditor/index.less +1 -0
- package/dist/core/editor/InputOptionsEditor/keyEventEffect.js +1 -1
- package/dist/core/table/useRowSelection.d.ts +1 -1
- package/dist/example/basic.js +1 -1
- package/package.json +1 -1
|
@@ -43,6 +43,7 @@ export var getFormulaInputEditor = function getFormulaInputEditor(options, repla
|
|
|
43
43
|
inputArgs = Object.assign({}, (_objectDestructuringEmpty(_ref2), _ref2));
|
|
44
44
|
var replaceValue = replaceIndex ? (_get = get(record, [replaceIndex])) !== null && _get !== void 0 ? _get : '' : originValue;
|
|
45
45
|
var calcValue = replaceValue.startsWith('=') ? replaceValue : "=".concat(replaceValue);
|
|
46
|
+
var originContainerValue = replaceValue === '' || replaceValue === null ? '' : calcValue;
|
|
46
47
|
var _useState = useState(calcValue),
|
|
47
48
|
_useState2 = _slicedToArray(_useState, 1),
|
|
48
49
|
inputValue = _useState2[0];
|
|
@@ -51,7 +52,7 @@ export var getFormulaInputEditor = function getFormulaInputEditor(options, repla
|
|
|
51
52
|
offsetX = _useState4[0],
|
|
52
53
|
setOffsetX = _useState4[1];
|
|
53
54
|
// 为了不重新render,再写一个
|
|
54
|
-
var _useState5 = useState(
|
|
55
|
+
var _useState5 = useState(originContainerValue),
|
|
55
56
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
56
57
|
containerValue = _useState6[0],
|
|
57
58
|
setContainerValue = _useState6[1];
|
|
@@ -54,7 +54,7 @@ var useKeyEventEffect = function useKeyEventEffect(_ref) {
|
|
|
54
54
|
}, [closeDorpDown, setOffsetX, setOpen]);
|
|
55
55
|
var handleKeyDown = useCallback(function (e) {
|
|
56
56
|
var _currentSpan$textCont, _currentSpan$textCont2;
|
|
57
|
-
if (e.key === 'ArrowUp' || e.key === 'ArrowDown') {
|
|
57
|
+
if (e.key === 'ArrowUp' || e.key === 'ArrowDown' || e.key === 'Delete') {
|
|
58
58
|
e.preventDefault();
|
|
59
59
|
e.stopPropagation();
|
|
60
60
|
return;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SheetTableType } from "../..";
|
|
2
2
|
export declare const useRowSelection: (dataSource: Record<string, unknown>[], rowSelection?: SheetTableType.TableRowSelection, hasChildren?: boolean) => [boolean[], (value: boolean[]) => void];
|
|
3
|
-
export declare const formatSelectionData: (param: Pick<SheetTableType.TableProps, "columns" | "
|
|
3
|
+
export declare const formatSelectionData: (param: Pick<SheetTableType.TableProps, "columns" | "showRemark" | "rowSelection" | "dataSource" | "rowKey"> & {
|
|
4
4
|
checked: boolean[];
|
|
5
5
|
}) => any[][];
|
package/dist/example/basic.js
CHANGED
|
@@ -197,7 +197,7 @@ var App = function App() {
|
|
|
197
197
|
var row = _ref4.row,
|
|
198
198
|
key = _ref4.key,
|
|
199
199
|
value = _ref4.value;
|
|
200
|
-
newData[row] = _objectSpread(_objectSpread({}, newData[row]), {}, _defineProperty({}, key, key === 'tags' ? (_String = String(value)) === null || _String === void 0 ? void 0 : _String.split(',') : value));
|
|
200
|
+
newData[row] = _objectSpread(_objectSpread({}, newData[row]), {}, _defineProperty({}, key === 'amount' ? 'formula' : key, key === 'tags' ? (_String = String(value)) === null || _String === void 0 ? void 0 : _String.split(',') : value));
|
|
201
201
|
});
|
|
202
202
|
setData(newData);
|
|
203
203
|
}, [dataSource]);
|