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

Commit 115f68f

Browse files
committed
metadata is not editable
1 parent 0bd5ca3 commit 115f68f

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/components/Cell.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,9 @@ export default function DefaultCell(cellProperties: Cell) {
8282
switch (dataType) {
8383
/** Plain text option */
8484
case DataTypes.TEXT:
85-
return (
85+
return (cellProperties.column as any).isMetadata ? (
86+
<span className="data-input">{value.value.toString()}</span>
87+
) : (
8688
<ContentEditable
8789
html={(value.value && value.value.toString()) || ""}
8890
onChange={handleOnChange}
@@ -119,7 +121,7 @@ export default function DefaultCell(cellProperties: Cell) {
119121
);
120122
});
121123

122-
return <span ref={containerRef} className={`${c("md_cell")}`} ></span>;
124+
return <span ref={containerRef} className={`${c("md_cell")}`}></span>;
123125
/** Selector option */
124126
case DataTypes.SELECT:
125127
return (

src/services/NoteInfo.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ export default class NoteInfo {
2222
id: this.id,
2323
note: this
2424
}
25-
console.log("debug");
2625
/** Metadata fields */
27-
aFile[MetadataColumns.FILE] = `${this.page.file.link.markdown()}`
26+
aFile[MetadataColumns.FILE] = `${this.page.file.link.markdown()}`;
2827
aFile[MetadataColumns.CREATED] = DateTime.fromISO(this.page.file.ctime).toFormat('yyyy-MM-dd');
2928
aFile[MetadataColumns.MODIFIED] = DateTime.fromISO(this.page.file.mtime).toFormat('yyyy-MM-dd');
29+
3030
/** Optional fields */
3131
Object.keys(this.page).forEach(property => {
3232
const value = this.page[property];

0 commit comments

Comments
 (0)