Skip to content

Commit 54bcb35

Browse files
committed
make args object
1 parent 39cbdcf commit 54bcb35

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/packages/core/workspace/entity-detail/entity-detail-workspace-base.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ export interface UmbEntityWorkspaceContextArgs {
1919
detailRepositoryAlias: string;
2020
}
2121

22+
export interface UmbEntityDetailWorkspaceContextCreateArgs {
23+
parent: UmbEntityModel;
24+
}
25+
2226
export abstract class UmbEntityDetailWorkspaceContextBase<
2327
EntityModelType extends UmbEntityModel,
2428
DetailRepositoryType extends UmbDetailRepository<EntityModelType> = UmbDetailRepository<EntityModelType>,
@@ -138,10 +142,10 @@ export abstract class UmbEntityDetailWorkspaceContextBase<
138142
}
139143
}
140144

141-
async create(parent: { entityType: string; unique: string | null }) {
145+
async create(args: UmbEntityDetailWorkspaceContextCreateArgs) {
142146
await this.#init;
143147
this.resetState();
144-
this.#parent.setValue(parent);
148+
this.#parent.setValue(args.parent);
145149
const request = this._detailRepository!.createScaffold();
146150
this._getDataPromise = request;
147151
let { data } = await request;

0 commit comments

Comments
 (0)