Files
Umbraco-CMS/src/Umbraco.Web.UI.Client/libs/entity-action/entity-bulk-action.ts
2023-05-24 12:55:14 +02:00

21 lines
696 B
TypeScript

import { UmbAction, UmbActionBase } from './repository-action';
import { UmbControllerHostElement } from '@umbraco-cms/backoffice/controller-api';
export interface UmbEntityBulkAction<RepositoryType = unknown> extends UmbAction<RepositoryType> {
selection: Array<string>;
setSelection(selection: Array<string>): void;
}
export class UmbEntityBulkActionBase<RepositoryType = unknown> extends UmbActionBase<RepositoryType> {
selection: Array<string>;
constructor(host: UmbControllerHostElement, repositoryAlias: string, selection: Array<string>) {
super(host, repositoryAlias);
this.selection = selection;
}
setSelection(selection: Array<string>) {
this.selection = selection;
}
}