add missing tree method to data source

This commit is contained in:
Mads Rasmussen
2023-03-24 14:12:46 +01:00
parent 1eb15880d0
commit f2c453178f

View File

@@ -14,7 +14,7 @@ import { RepositoryTreeDataSource } from 'libs/repository/repository-tree-data-s
* @implements {RepositoryTreeDataSource}
*/
export class UmbStylesheetTreeServerDataSource
implements RepositoryTreeDataSource<PagedFileSystemTreeItemPresentationModel>
implements RepositoryTreeDataSource<PagedFileSystemTreeItemPresentationModel, FileSystemTreeItemPresentationModel>
{
#host: UmbControllerHostInterface;
@@ -50,4 +50,19 @@ export class UmbStylesheetTreeServerDataSource
})
);
}
/**
* Fetches stylesheet items from the server
* @param {(string | undefined)} path
* @return {*}
* @memberof UmbStylesheetTreeServerDataSource
*/
async getItems(path: Array<string>) {
return tryExecuteAndNotify(
this.#host,
StylesheetResource.getTreeStylesheetItem({
path,
})
);
}
}