Skip to content

Commit 58773e6

Browse files
committed
nits, user feedback
1 parent c4ea68f commit 58773e6

File tree

2 files changed

+16
-5
lines changed

2 files changed

+16
-5
lines changed

apps/roam/src/components/results-view/ResultsTable.tsx

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import React, {
77
} from "react";
88
import { Button, HTMLTable, Icon, IconName } from "@blueprintjs/core";
99
import { IconNames } from "@blueprintjs/icons";
10+
import { render as renderToast } from "roamjs-components/components/Toast";
1011
import { Column, Result } from "~/utils/types";
1112
import type { FilterData, Sorts, Views } from "~/utils/parseResultSettings";
1213
import Filter, { Filters } from "roamjs-components/components/Filter";
@@ -265,12 +266,22 @@ const ResultRow = ({
265266
);
266267
const trRef = useRef<HTMLTableRowElement>(null);
267268
const onDelete = () => {
268-
void deleteBlock(r["relation-uid"])
269-
.catch((e) => {
270-
console.error(e);
271-
})
269+
deleteBlock(r["relation-uid"])
272270
.then(() => {
271+
renderToast({
272+
id: "delete-relation-success",
273+
content: "Relation deleted",
274+
intent: "success",
275+
});
273276
onRefresh();
277+
})
278+
.catch((e) => {
279+
console.error(e);
280+
renderToast({
281+
id: "delete-relation-error",
282+
content: "Could not delete relation",
283+
intent: "danger",
284+
});
274285
});
275286
};
276287
return (

apps/roam/src/utils/getDiscourseContextResults.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ const buildSelections = ({
5858
text: `node:${conditionUid}-Anchor`,
5959
});
6060
}
61-
if (getSetting("use-reified-relations"))
61+
if (getSetting<boolean>("use-reified-relations", false))
6262
selections.push({
6363
uid: window.roamAlphaAPI.util.generateUID(),
6464
label: "relation",

0 commit comments

Comments
 (0)