Skip to content

Commit

Permalink
Canvas add/edit node dialog fix (#136)
Browse files Browse the repository at this point in the history
* bring back node edit, add close dialog onSuccess

* 1.10.6
  • Loading branch information
mdroidian authored Aug 8, 2023
1 parent 63db095 commit 49028c0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 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.10.5",
"version": "1.10.6",
"description": "Introduces new user interfaces for building queries in Roam",
"main": "./build/main.js",
"author": {
Expand Down
8 changes: 5 additions & 3 deletions src/components/TldrawCanvas.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -631,9 +631,9 @@ class DiscourseNodeUtil extends TLBoxUtil<DiscourseNodeShape> {
[this.app, shape.id]
);
const [isLabelEditOpen, setIsEditLabelOpen] = useState(false);
// useEffect(() => {
// if (isEditing) setIsEditLabelOpen(true);
// }, [isEditing, setIsEditLabelOpen]);
useEffect(() => {
if (isEditing) setIsEditLabelOpen(true);
}, [isEditing, setIsEditLabelOpen]);
const contentRef = useRef<HTMLDivElement>(null);
const [loaded, setLoaded] = useState("");
useEffect(() => {
Expand Down Expand Up @@ -734,6 +734,8 @@ class DiscourseNodeUtil extends TLBoxUtil<DiscourseNodeShape> {
w,
h,
});
setIsEditLabelOpen(false);
this.app.setEditingId(null);
await this.createExistingRelations(shape, {
allRecords,
relationIds,
Expand Down

0 comments on commit 49028c0

Please sign in to comment.