schummar-table 0.40.0 → 0.40.2
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.cjs +11 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +11 -1
- package/dist/index.js.map +1 -1
- package/package.json +7 -7
package/dist/index.js
CHANGED
|
@@ -2537,6 +2537,16 @@ function calcItems(state) {
|
|
|
2537
2537
|
|
|
2538
2538
|
// src/internalState/calcProps.ts
|
|
2539
2539
|
import { useMemo as useMemo8 } from "react";
|
|
2540
|
+
|
|
2541
|
+
// src/exporters/serializer.ts
|
|
2542
|
+
function defaultSerializer(x) {
|
|
2543
|
+
if (x instanceof Date || typeof x === "number" || typeof x === "string") {
|
|
2544
|
+
return x;
|
|
2545
|
+
}
|
|
2546
|
+
return JSON.stringify(x);
|
|
2547
|
+
}
|
|
2548
|
+
|
|
2549
|
+
// src/internalState/calcProps.ts
|
|
2540
2550
|
var noopParentId = () => void 0;
|
|
2541
2551
|
function calcProps(props) {
|
|
2542
2552
|
const cache = useTableMemo();
|
|
@@ -2597,7 +2607,7 @@ function calcProps(props) {
|
|
|
2597
2607
|
`columns.${cacheKey}.renderCell`,
|
|
2598
2608
|
(_d2 = renderCell != null ? renderCell : defaults2 == null ? void 0 : defaults2.renderCell) != null ? _d2 : asString
|
|
2599
2609
|
),
|
|
2600
|
-
exportCell: (_e2 = exportCell != null ? exportCell : defaults2 == null ? void 0 : defaults2.exportCell) != null ? _e2 :
|
|
2610
|
+
exportCell: (_e2 = exportCell != null ? exportCell : defaults2 == null ? void 0 : defaults2.exportCell) != null ? _e2 : defaultSerializer,
|
|
2601
2611
|
sortBy: ((_f2 = sortBy != null ? sortBy : defaults2 == null ? void 0 : defaults2.sortBy) != null ? _f2 : [
|
|
2602
2612
|
(v) => typeof v === "number" || v instanceof Date ? v : v === null || v === void 0 ? "" : String(v)
|
|
2603
2613
|
]).map((function_, i) => cache(`columns.${cacheKey}.sortBy.${i}`, function_)),
|