feat: Allow moving draft documents (#4652)

* feat: Allow moving draft documents

* Allow drag-n-drop move of draft documents

* fix: Allow moving draft without a collection

* fix: Allow moving draft without a collection
This commit is contained in:
Tom Moor
2023-01-06 19:31:06 -08:00
committed by GitHub
parent 9f825b9adf
commit e67ac1215a
8 changed files with 61 additions and 63 deletions

View File

@@ -77,8 +77,9 @@ const DocumentBreadcrumb: React.FC<Props> = ({
}
const path = React.useMemo(
() => collection?.pathToDocument?.(document.id).slice(0, -1) || [],
[collection, document]
() => collection?.pathToDocument(document.id).slice(0, -1) || [],
// eslint-disable-next-line react-hooks/exhaustive-deps
[collection, document, document.collectionId, document.parentDocumentId]
);
const items = React.useMemo(() => {