workspace actions doesn't have access to a selection

This commit is contained in:
Mads Rasmussen
2023-03-01 15:48:53 +01:00
parent 55f4f2bdcb
commit 5a5ad7eec9

View File

@@ -37,7 +37,7 @@ extensionRegistry.register(manifest);
### The Workspace Action Class
As part of the Extension Manifest you can attach a class that will be instanciated as part of the action. It will have access to the host element, the Workspace Context, and an array of uniques (key etc). When the action is clicked the `execute` method on the api class will be run. When the action is completed, an event on the host element will be dispatched to notify any surrounding elements.
As part of the Extension Manifest you can attach a class that will be instanciated as part of the action. It will have access to the host element and the Workspace Context. When the action is clicked the `execute` method on the api class will be run. When the action is completed, an event on the host element will be dispatched to notify any surrounding elements.
```ts
import { UmbEntityBulkActionBase } from '@umbraco-cms/entity-action';
@@ -45,8 +45,8 @@ import { UmbControllerHostInterface } from '@umbraco-cms/controller';
import { MyRepository } from './my-repository';
export class MyWorkspaceAction extends UmbWorkspaceActionBase {
constructor(host: UmbControllerHostInterface, selection: Array<string>) {
super(host, selection);
constructor(host: UmbControllerHostInterface) {
super(host);
}
async execute() {