From df261ff2333c8dcc18d3a391f29066804e7387ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Fri, 9 Jun 2023 08:41:27 +0200 Subject: [PATCH] revert the updateData method --- .../src/mocks/data/entity-tree.data.ts | 8 ++++---- src/Umbraco.Web.UI.Client/src/mocks/data/entity.data.ts | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/mocks/data/entity-tree.data.ts b/src/Umbraco.Web.UI.Client/src/mocks/data/entity-tree.data.ts index ce2c3710f7..c5436a0e15 100644 --- a/src/Umbraco.Web.UI.Client/src/mocks/data/entity-tree.data.ts +++ b/src/Umbraco.Web.UI.Client/src/mocks/data/entity-tree.data.ts @@ -9,15 +9,15 @@ export class UmbEntityTreeData { this.#detailDatabase = detailDatabase; } - move(ids: Array, destinationKey: string) { - const destinationItem = this.#detailDatabase.getById(destinationKey); - if (!destinationItem) throw new Error(`Destination item with key ${destinationKey} not found`); + move(ids: Array, destinationId: string) { + const destinationItem = this.#detailDatabase.getById(destinationId); + if (!destinationItem) throw new Error(`Destination item with key ${destinationId} not found`); const items = this.#detailDatabase.getByIds(ids); const movedItems = items.map((item) => { return { ...item, - parentId: destinationKey, + parentId: destinationId, }; }); diff --git a/src/Umbraco.Web.UI.Client/src/mocks/data/entity.data.ts b/src/Umbraco.Web.UI.Client/src/mocks/data/entity.data.ts index 4cfcce84a5..67e080f135 100644 --- a/src/Umbraco.Web.UI.Client/src/mocks/data/entity.data.ts +++ b/src/Umbraco.Web.UI.Client/src/mocks/data/entity.data.ts @@ -94,8 +94,8 @@ export class UmbEntityData extends UmbData { return deletedKeys; } - updateData(id: string, updateItem: T) { - const itemIndex = this.data.findIndex((item) => item.id === id); + updateData(updateItem: T) { + const itemIndex = this.data.findIndex((item) => item.id === updateItem.id); const item = this.data[itemIndex]; if (!item) return;