@ceed/cds 1.31.2-next.2 → 1.31.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.browser.js +1 -1
- package/dist/index.browser.js.map +2 -2
- package/dist/index.cjs +11 -8
- package/dist/index.js +11 -8
- package/framer/index.js +1 -1
- package/package.json +2 -3
package/dist/index.cjs
CHANGED
|
@@ -3800,7 +3800,9 @@ var VirtualizedTableRow = (0, import_react24.memo)(StyledTableRow2, (prevProps,
|
|
|
3800
3800
|
prevProps["data-row-id"] === nextProps["data-row-id"] && // @ts-ignore
|
|
3801
3801
|
prevProps["data-index"] === nextProps["data-index"] && prevProps.tabIndex === nextProps.tabIndex && prevProps["aria-checked"] === nextProps["aria-checked"] && // Track column structure changes (e.g. isCellEditable toggled, columns added/removed)
|
|
3802
3802
|
// @ts-ignore
|
|
3803
|
-
prevProps["data-columns-key"] === nextProps["data-columns-key"]
|
|
3803
|
+
prevProps["data-columns-key"] === nextProps["data-columns-key"] && // Track row data changes — ensures re-render when row object reference changes (e.g. after refetch)
|
|
3804
|
+
// @ts-ignore
|
|
3805
|
+
prevProps["data-row-key"] === nextProps["data-row-key"];
|
|
3804
3806
|
});
|
|
3805
3807
|
|
|
3806
3808
|
// src/components/DataTable/hooks.ts
|
|
@@ -4507,13 +4509,13 @@ Pagination.displayName = "Pagination";
|
|
|
4507
4509
|
var Pagination_default = Pagination;
|
|
4508
4510
|
|
|
4509
4511
|
// src/components/DataTable/DataTable.tsx
|
|
4510
|
-
var
|
|
4511
|
-
var
|
|
4512
|
-
function
|
|
4513
|
-
if (!
|
|
4514
|
-
|
|
4512
|
+
var _objectVersionCache = /* @__PURE__ */ new WeakMap();
|
|
4513
|
+
var _objectVersionCounter = 0;
|
|
4514
|
+
function getObjectVersion(obj) {
|
|
4515
|
+
if (!_objectVersionCache.has(obj)) {
|
|
4516
|
+
_objectVersionCache.set(obj, ++_objectVersionCounter);
|
|
4515
4517
|
}
|
|
4516
|
-
return
|
|
4518
|
+
return _objectVersionCache.get(obj);
|
|
4517
4519
|
}
|
|
4518
4520
|
var EMPTY_CHECKBOX_PROPS = {};
|
|
4519
4521
|
function Component(props, apiRef) {
|
|
@@ -4611,7 +4613,7 @@ function Component(props, apiRef) {
|
|
|
4611
4613
|
overscan: 10
|
|
4612
4614
|
});
|
|
4613
4615
|
const paginationModel = (0, import_react28.useMemo)(() => ({ page, pageSize }), [page, pageSize]);
|
|
4614
|
-
const columnsKey =
|
|
4616
|
+
const columnsKey = getObjectVersion(columns);
|
|
4615
4617
|
const headerCheckboxElement = (0, import_react28.useMemo)(
|
|
4616
4618
|
() => /* @__PURE__ */ import_react28.default.createElement(
|
|
4617
4619
|
RenderCheckbox,
|
|
@@ -4935,6 +4937,7 @@ function Component(props, apiRef) {
|
|
|
4935
4937
|
key: virtualizedRow.key,
|
|
4936
4938
|
"data-row-id": rowId,
|
|
4937
4939
|
"data-index": rowIndex,
|
|
4940
|
+
"data-row-key": getObjectVersion(row),
|
|
4938
4941
|
"data-columns-key": columnsKey,
|
|
4939
4942
|
"aria-rowindex": rowIndex + 1,
|
|
4940
4943
|
role: checkboxSelection && !disableSelectionOnClick ? "checkbox" : void 0,
|
package/dist/index.js
CHANGED
|
@@ -3683,7 +3683,9 @@ var VirtualizedTableRow = memo(StyledTableRow2, (prevProps, nextProps) => {
|
|
|
3683
3683
|
prevProps["data-row-id"] === nextProps["data-row-id"] && // @ts-ignore
|
|
3684
3684
|
prevProps["data-index"] === nextProps["data-index"] && prevProps.tabIndex === nextProps.tabIndex && prevProps["aria-checked"] === nextProps["aria-checked"] && // Track column structure changes (e.g. isCellEditable toggled, columns added/removed)
|
|
3685
3685
|
// @ts-ignore
|
|
3686
|
-
prevProps["data-columns-key"] === nextProps["data-columns-key"]
|
|
3686
|
+
prevProps["data-columns-key"] === nextProps["data-columns-key"] && // Track row data changes — ensures re-render when row object reference changes (e.g. after refetch)
|
|
3687
|
+
// @ts-ignore
|
|
3688
|
+
prevProps["data-row-key"] === nextProps["data-row-key"];
|
|
3687
3689
|
});
|
|
3688
3690
|
|
|
3689
3691
|
// src/components/DataTable/hooks.ts
|
|
@@ -4390,13 +4392,13 @@ Pagination.displayName = "Pagination";
|
|
|
4390
4392
|
var Pagination_default = Pagination;
|
|
4391
4393
|
|
|
4392
4394
|
// src/components/DataTable/DataTable.tsx
|
|
4393
|
-
var
|
|
4394
|
-
var
|
|
4395
|
-
function
|
|
4396
|
-
if (!
|
|
4397
|
-
|
|
4395
|
+
var _objectVersionCache = /* @__PURE__ */ new WeakMap();
|
|
4396
|
+
var _objectVersionCounter = 0;
|
|
4397
|
+
function getObjectVersion(obj) {
|
|
4398
|
+
if (!_objectVersionCache.has(obj)) {
|
|
4399
|
+
_objectVersionCache.set(obj, ++_objectVersionCounter);
|
|
4398
4400
|
}
|
|
4399
|
-
return
|
|
4401
|
+
return _objectVersionCache.get(obj);
|
|
4400
4402
|
}
|
|
4401
4403
|
var EMPTY_CHECKBOX_PROPS = {};
|
|
4402
4404
|
function Component(props, apiRef) {
|
|
@@ -4494,7 +4496,7 @@ function Component(props, apiRef) {
|
|
|
4494
4496
|
overscan: 10
|
|
4495
4497
|
});
|
|
4496
4498
|
const paginationModel = useMemo10(() => ({ page, pageSize }), [page, pageSize]);
|
|
4497
|
-
const columnsKey =
|
|
4499
|
+
const columnsKey = getObjectVersion(columns);
|
|
4498
4500
|
const headerCheckboxElement = useMemo10(
|
|
4499
4501
|
() => /* @__PURE__ */ React25.createElement(
|
|
4500
4502
|
RenderCheckbox,
|
|
@@ -4818,6 +4820,7 @@ function Component(props, apiRef) {
|
|
|
4818
4820
|
key: virtualizedRow.key,
|
|
4819
4821
|
"data-row-id": rowId,
|
|
4820
4822
|
"data-index": rowIndex,
|
|
4823
|
+
"data-row-key": getObjectVersion(row),
|
|
4821
4824
|
"data-columns-key": columnsKey,
|
|
4822
4825
|
"aria-rowindex": rowIndex + 1,
|
|
4823
4826
|
role: checkboxSelection && !disableSelectionOnClick ? "checkbox" : void 0,
|