Skip to content
This repository was archived by the owner on Jul 28, 2025. It is now read-only.

Commit 946e082

Browse files
committed
key on span
1 parent d39d60d commit 946e082

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

src/components/cellTypes/MarkdownCell.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import React, { useEffect, useRef } from "react";
55

66
const MarkdownCell = (mdProps: CellComponentProps) => {
77
const { defaultCell } = mdProps;
8-
const { table, row, column } = defaultCell;
8+
const { cell, table, row, column } = defaultCell;
99
const { tableState } = table.options.meta;
1010
const markdownRow = tableState.data((state) => state.rows[row.index]);
1111
const mdRef = useRef<HTMLDivElement>();
@@ -21,7 +21,13 @@ const MarkdownCell = (mdProps: CellComponentProps) => {
2121
);
2222
}
2323
});
24-
return <span ref={mdRef} className={`${c("md_cell")}`}></span>;
24+
return (
25+
<span
26+
ref={mdRef}
27+
className={`${c("md_cell")}`}
28+
key={`markdown_${cell.id}`}
29+
/>
30+
);
2531
};
2632

2733
export default MarkdownCell;

src/components/cellTypes/MetadataTimeCell.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { CellComponentProps } from "cdm/ComponentsModel";
2-
import { TableColumn } from "cdm/FolderModel";
32
import { renderMarkdown } from "components/obsidianArq/MarkdownRenderer";
43
import { c } from "helpers/StylesHelper";
54
import { DateTime } from "luxon";
@@ -25,7 +24,13 @@ const MetadataTimeCell = (mdProps: CellComponentProps) => {
2524
renderMarkdown(defaultCell, metadataValue, mdRef.current, 5);
2625
}
2726
});
28-
return <span ref={mdRef} className={`${c("md_cell")}`}></span>;
27+
return (
28+
<span
29+
ref={mdRef}
30+
className={`${c("md_cell")}`}
31+
key={`metadata_time_${cell.id}`}
32+
/>
33+
);
2934
};
3035

3136
export default MetadataTimeCell;

0 commit comments

Comments
 (0)