Open-source and local-first Slack and Notion alternative that puts you in control of your data
TypeScript chatchat-applicationcrdteditorelectronknowledge-baselocal-firstnotionnotion-alternativerealtime-collaborationself-hostedslacksqliteteam-collaborationwikiyjs
Fix document update
Hakan Shehu96c8bfe0178a
diff --git a/desktop/src/components/documents/document-editor.tsx b/desktop/src/components/documents/document-editor.tsxindex 97e3aa81..fd404abe 100644--- a/desktop/src/components/documents/document-editor.tsx+++ b/desktop/src/components/documents/document-editor.tsx@@ -183,6 +183,7 @@ export const DocumentEditor = ({ node, nodes }: DocumentEditorProps) => {const updateNodeMutation = workspace.schema.updateTable('nodes').set({+ index: newEditorNode.index,attrs: newEditorNode.attrs? JSON.stringify(newEditorNode.attrs): null,@@ -190,6 +191,7 @@ export const DocumentEditor = ({ node, nodes }: DocumentEditorProps) => {? JSON.stringify(newEditorNode.content): null,})+ .where('id', '=', newEditorNode.id).compile();await workspace.mutate(updateNodeMutation);@@ -213,7 +215,7 @@ export const DocumentEditor = ({ node, nodes }: DocumentEditorProps) => {}nodesSnapshot.current = newEditorNodes;- }, 100),+ }, 500),[node.id],);@@ -288,7 +290,7 @@ export const DocumentEditor = ({ node, nodes }: DocumentEditorProps) => {.setTextSelection(selection).run();nodesSnapshot.current = newEditorNodes;- }, 100),+ }, 500),[node.id],);