@zhenliang/sheet 0.1.96 → 0.1.98-beta.1
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.
|
@@ -32,7 +32,7 @@ var formulaString = function formulaString(value, currentValue, precision, max,
|
|
|
32
32
|
result = min;
|
|
33
33
|
}
|
|
34
34
|
if (precision) {
|
|
35
|
-
result = formatPrecision(result);
|
|
35
|
+
result = formatPrecision(result, precision);
|
|
36
36
|
}
|
|
37
37
|
return parseFloat(result);
|
|
38
38
|
} catch (_unused) {
|
|
@@ -126,7 +126,7 @@ export var getNumberEditor = function getNumberEditor(extraProps, getExtraProps)
|
|
|
126
126
|
NumberEditor.parser = function (value, record, currentValue) {
|
|
127
127
|
var _String2;
|
|
128
128
|
var result = (_String2 = String(value)) === null || _String2 === void 0 ? void 0 : _String2.replace(/[,|%]/g, '');
|
|
129
|
-
result = formulaString(result, currentValue);
|
|
129
|
+
result = formulaString(result, currentValue, precision);
|
|
130
130
|
if (isNil(result) || isNaN(result)) {
|
|
131
131
|
return null;
|
|
132
132
|
}
|
|
@@ -138,7 +138,7 @@ export var getNumberEditor = function getNumberEditor(extraProps, getExtraProps)
|
|
|
138
138
|
return true;
|
|
139
139
|
}
|
|
140
140
|
var result = (_String3 = String(value)) === null || _String3 === void 0 ? void 0 : _String3.replace(/,/g, '');
|
|
141
|
-
result = formulaString(result, currentValue);
|
|
141
|
+
result = formulaString(result, currentValue, precision);
|
|
142
142
|
// parse number with thousands separator
|
|
143
143
|
var range = rangeMethod === null || rangeMethod === void 0 ? void 0 : rangeMethod(record);
|
|
144
144
|
if (!isNil(range === null || range === void 0 ? void 0 : range.max) && !isNil(range === null || range === void 0 ? void 0 : range.min)) {
|
|
@@ -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[][];
|