workspace actions doesn't have access to a selection
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user