From f9123cfd928bae48db79cae6fb6da4b09f8f488a Mon Sep 17 00:00:00 2001 From: Simone Taeggi Date: Fri, 18 Nov 2022 12:38:05 +0100 Subject: [PATCH] add the event to track when we edit the Collection name in the content-type-builder --- .../admin/src/components/FormModal/index.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/core/content-type-builder/admin/src/components/FormModal/index.js b/packages/core/content-type-builder/admin/src/components/FormModal/index.js index 3b30bd39ac..0eb310aaf3 100644 --- a/packages/core/content-type-builder/admin/src/components/FormModal/index.js +++ b/packages/core/content-type-builder/admin/src/components/FormModal/index.js @@ -510,8 +510,13 @@ const FormModal = () => { } else { // We cannot switch from collection type to single when the modal is making relations other than oneWay or manyWay if (canEditContentType(allDataSchema, modifiedData)) { + // allDataSchema.contentType.schema.displayName onCloseModal(); + if (modifiedData?.displayName !== allDataSchema?.contentType?.schema?.displayName) { + trackUsage('didEditFieldOnContentTypeInCTB'); + } + submitData(modifiedData); } else { toggleNotification({