Skip to content

Commit

Permalink
Tldraw - grab current title on relation create (#285)
Browse files Browse the repository at this point in the history
* getPageTitleByPageUid instead of from node props

* 1.33.3
  • Loading branch information
mdroidian authored Oct 12, 2024
1 parent 7c5536a commit b2e2c26
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "query-builder",
"version": "1.33.2",
"version": "1.33.3",
"description": "Introduces new user interfaces for building queries in Roam",
"main": "./build/main.js",
"author": {
Expand Down
6 changes: 4 additions & 2 deletions src/components/tldraw/Tldraw.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -579,12 +579,14 @@ const TldrawCanvas = ({ title }: Props) => {
(t[2] === "destination" && !isOriginal)
? source
: target;
const { title, uid } =
const { uid } =
targetNode.props as DiscourseNodeShape["props"];
return [
t[0],
isPageUid(uid) ? "has title" : "with uid",
isPageUid(uid) ? title : uid,
isPageUid(uid)
? getPageTitleByPageUid(uid)
: uid,
];
}
return t.slice(0);
Expand Down

0 comments on commit b2e2c26

Please sign in to comment.