@ai-matrx/design-system 0.59.0 → 0.59.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.
package/dist/data-table/index.js
CHANGED
|
@@ -35583,9 +35583,9 @@ var RowDrawings = class {
|
|
|
35583
35583
|
* The element to hand React for this row. The SAME object as last time when `raw` draws what the
|
|
35584
35584
|
* last one drew (its handlers are re-pointed); a new one otherwise.
|
|
35585
35585
|
*/
|
|
35586
|
-
draw(rowId, raw) {
|
|
35586
|
+
draw(rowId, raw, fresh = false) {
|
|
35587
35587
|
const previous = this.rows.get(rowId);
|
|
35588
|
-
if (previous) {
|
|
35588
|
+
if (previous && !fresh) {
|
|
35589
35589
|
const updates = [];
|
|
35590
35590
|
if (sameDrawing(previous.raw, raw, "", "", 0, updates) && updates.every(([path2]) => previous.slots.has(path2))) {
|
|
35591
35591
|
for (const [path2, fn] of updates) previous.slots.get(path2).fn = fn;
|
|
@@ -52594,8 +52594,12 @@ function versionFacts(version2) {
|
|
|
52594
52594
|
function sameBodyRow(a, b) {
|
|
52595
52595
|
return a.row === b.row && a.index === b.index && a.epoch === b.epoch && a.probe === b.probe && a.rowId === b.rowId && a.facts.length === b.facts.length && a.facts.every((fact, i) => Object.is(fact, b.facts[i]));
|
|
52596
52596
|
}
|
|
52597
|
-
var MatrxTableBodyRow = memo(function MatrxTableBodyRow2(
|
|
52598
|
-
|
|
52597
|
+
var MatrxTableBodyRow = memo(function MatrxTableBodyRow2(props) {
|
|
52598
|
+
const { rowId, row, index, draw } = props;
|
|
52599
|
+
const last = useRef28(null);
|
|
52600
|
+
const fresh = last.current === null || !sameBodyRow({ ...last.current, probe: props.probe }, props);
|
|
52601
|
+
last.current = props;
|
|
52602
|
+
return draw(rowId, row, index, fresh);
|
|
52599
52603
|
}, sameBodyRow);
|
|
52600
52604
|
var MatrxTableChrome = memo(function MatrxTableChrome2({ render }) {
|
|
52601
52605
|
return /* @__PURE__ */ jsx59(Fragment19, { children: render() });
|
|
@@ -55114,7 +55118,7 @@ function MatrxDataTableCore(coreProps) {
|
|
|
55114
55118
|
const rowProbe = useRenderEpoch(rowShape.filter((value) => typeof value === "function" || typeof value === "object" && value !== null));
|
|
55115
55119
|
const rowDrawings = useRef28(null);
|
|
55116
55120
|
rowDrawings.current ??= new RowDrawings();
|
|
55117
|
-
const drawBodyRow = (rowId, row, index) => rowDrawings.current.draw(rowId, renderRecordRow(row, index));
|
|
55121
|
+
const drawBodyRow = (rowId, row, index, fresh) => rowDrawings.current.draw(rowId, renderRecordRow(row, index), fresh);
|
|
55118
55122
|
chromeLatest.current = { processed, data, toggleAllOnPage, showMore: progressiveRows.showMore, applySavedView };
|
|
55119
55123
|
const chromeGeometry = [
|
|
55120
55124
|
...Object.entries(effectiveColumnWidths).flat(),
|