pass data according to interface
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import type { UmbApi } from '@umbraco-cms/backoffice/extension-api';
|
||||
|
||||
export interface UmbAction extends UmbApi {
|
||||
execute(): Promise<void>;
|
||||
export interface UmbAction<ArgsType> extends UmbApi {
|
||||
public args: ArgsType;
|
||||
public execute(): Promise<void>;
|
||||
protected _host: UmbControllerHost;
|
||||
}
|
||||
|
||||
@@ -62,9 +62,9 @@ export class UmbEntityActionElement extends UmbLitElement {
|
||||
this.#api = await createExtensionApi(this.#manifest, [
|
||||
this,
|
||||
{
|
||||
unique: this.#unique,
|
||||
entityType: this.#entityType,
|
||||
...this.#manifest.meta,
|
||||
unique: this.#unique,
|
||||
meta: this.#manifest.meta,
|
||||
},
|
||||
]);
|
||||
|
||||
|
||||
@@ -5,9 +5,7 @@ import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
|
||||
* @export
|
||||
* @interface UmbEntityAction
|
||||
*/
|
||||
export interface UmbEntityAction<ArgsMetaType> {
|
||||
args: UmbEntityActionArgs<ArgsMetaType>;
|
||||
|
||||
export interface UmbEntityAction<ArgsMetaType> extends UmbAction<UmbEntityActionArgs<ArgsMetaType>> {
|
||||
/**
|
||||
* The href location, the action will act as a link.
|
||||
* @returns {Promise<string | null | undefined>}
|
||||
|
||||
Reference in New Issue
Block a user