Only render folders for move document blueprint

This commit is contained in:
Mads Rasmussen
2024-05-30 13:23:19 +02:00
committed by Jacob Overgaard
parent 039c5b1be3
commit d80eec9b3e
2 changed files with 7 additions and 1 deletions

View File

@@ -15,6 +15,7 @@ const entityActions: Array<ManifestTypes> = [
treeRepositoryAlias: UMB_DOCUMENT_BLUEPRINT_TREE_REPOSITORY_ALIAS,
moveRepositoryAlias: UMB_MOVE_DOCUMENT_BLUEPRINT_REPOSITORY_ALIAS,
treeAlias: UMB_DOCUMENT_BLUEPRINT_TREE_ALIAS,
foldersOnly: true,
},
},
];

View File

@@ -41,7 +41,11 @@ export class UmbDocumentBlueprintTreeServerDataSource extends UmbTreeServerDataS
const getRootItems = (args: UmbTreeRootItemsRequestArgs) =>
// eslint-disable-next-line local-rules/no-direct-api-import
DocumentBlueprintService.getTreeDocumentBlueprintRoot({ skip: args.skip, take: args.take });
DocumentBlueprintService.getTreeDocumentBlueprintRoot({
foldersOnly: args.foldersOnly,
skip: args.skip,
take: args.take,
});
const getChildrenOf = (args: UmbTreeChildrenOfRequestArgs) => {
if (args.parent.unique === null) {
@@ -50,6 +54,7 @@ const getChildrenOf = (args: UmbTreeChildrenOfRequestArgs) => {
// eslint-disable-next-line local-rules/no-direct-api-import
return DocumentBlueprintService.getTreeDocumentBlueprintChildren({
parentId: args.parent.unique,
foldersOnly: args.foldersOnly,
});
}
};