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

Commit 825c087

Browse files
committed
adjustments
1 parent e396077 commit 825c087

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
lines changed

src/DatabaseView.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,11 @@ export class DatabaseView extends TextFileView implements HoverParent {
7474
get isPrimary(): boolean {
7575
return this.plugin.getStateManager(this.file)?.getAView() === this;
7676
}
77-
78-
onMoreOptionsMenu(menu: Menu) {
77+
onPaneMenu(menu: Menu, source: string, callSuper: boolean = true): void {
78+
if (source !== "more-options") {
79+
super.onPaneMenu(menu, source);
80+
return;
81+
}
7982
// Add a menu item to force the database to markdown view
8083
menu
8184
.addItem((item) => {
@@ -109,7 +112,9 @@ export class DatabaseView extends TextFileView implements HoverParent {
109112
})
110113
.addSeparator();
111114

112-
super.onMoreOptionsMenu(menu);
115+
if (callSuper) {
116+
super.onPaneMenu(menu, source);
117+
}
113118
}
114119

115120
async initDatabase(): Promise<void> {

src/components/Cell.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,12 @@ export default function DefaultCell(cellProperties: Cell) {
7171
break;
7272
case DataTypes.MARKDOWN:
7373
containerCellRef.current.innerHTML = "";
74-
renderMarkdown(cellProperties, cellValue, containerCellRef.current, 5);
74+
renderMarkdown(
75+
cellProperties,
76+
cellValue.toString(),
77+
containerCellRef.current,
78+
5
79+
);
7580
break;
7681
default:
7782
// do nothing
@@ -98,7 +103,7 @@ export default function DefaultCell(cellProperties: Cell) {
98103
);
99104
renderMarkdown(
100105
cellProperties,
101-
contextValue.value,
106+
contextValue.value.toString(),
102107
containerCellRef.current,
103108
5
104109
);

0 commit comments

Comments
 (0)