Merge branch 'feature/entity-action-kind' of https://github.com/umbraco/Umbraco.CMS.Backoffice into feature/entity-action-kind

This commit is contained in:
Mads Rasmussen
2024-03-03 15:42:10 +01:00
2 changed files with 11 additions and 5 deletions

View File

@@ -38,7 +38,13 @@ export class UmbEntityBulkActionElement extends UmbLitElement {
async #createApi() {
if (!this._manifest) return;
this.#api = await createExtensionApi(this._manifest, [this, this._manifest.meta.repositoryAlias, this._selection]);
this.#api = await createExtensionApi(this._manifest, [
this,
{
meta: this._manifest.meta,
},
this._selection,
]);
}
#api?: UmbEntityBulkActionBase;

View File

@@ -1,4 +1,4 @@
import type { UmbAction} from '@umbraco-cms/backoffice/action';
import type { UmbAction } from '@umbraco-cms/backoffice/action';
import { UmbActionBase } from '@umbraco-cms/backoffice/action';
import type { UmbControllerHostElement } from '@umbraco-cms/backoffice/controller-api';
@@ -12,10 +12,10 @@ export abstract class UmbEntityBulkActionBase<RepositoryType = unknown>
extends UmbActionBase<RepositoryType>
implements UmbEntityBulkAction<RepositoryType>
{
selection: Array<string>;
selection: Array<string> = [];
constructor(host: UmbControllerHostElement, repositoryAlias: string, selection: Array<string>) {
super(host, repositoryAlias);
constructor(host: UmbControllerHostElement, args: any, selection: Array<string>) {
super(host, args);
this.selection = selection;
}