aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2021-09-14 23:16:17 -0400
committerbobzel <zzzman@gmail.com>2021-09-14 23:16:17 -0400
commite1533161b473f31544d018432abc8a9c8d4d0bfc (patch)
tree7728ca216c89343089368a4d8671ce1d6d652d8c
parent72e6023a199fc859cc84c5d22bb12e948d4a471b (diff)
fixed treeviews so that in filesys mode you can't indent a document into anything other than a folder.
-rw-r--r--src/client/views/collections/TreeView.tsx1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/client/views/collections/TreeView.tsx b/src/client/views/collections/TreeView.tsx
index 6bb7fb748..97de097e0 100644
--- a/src/client/views/collections/TreeView.tsx
+++ b/src/client/views/collections/TreeView.tsx
@@ -858,6 +858,7 @@ export class TreeView extends React.Component<TreeViewProps> {
}
const dentDoc = (editTitle: boolean, newParent: Doc, addAfter: Doc | undefined, parent: TreeView | CollectionTreeView | undefined) => {
+ if (parent instanceof TreeView && parent.props.treeView.fileSysMode && !newParent.isFolder) return;
const fieldKey = Doc.LayoutFieldKey(newParent);
if (remove && fieldKey && Cast(newParent[fieldKey], listSpec(Doc)) !== undefined) {
remove(child);