Merge pull request #11885 from Budibase/block-ejection-event

Add event for block ejection
This commit is contained in:
Andrew Kingston 2023-09-26 09:25:05 +01:00 committed by GitHub
commit fc80c674ee
2 changed files with 6 additions and 0 deletions

View File

@ -2,6 +2,7 @@ export const Events = {
COMPONENT_CREATED: "component:created",
COMPONENT_UPDATED: "component:updated",
APP_VIEW_PUBLISHED: "app:view_published",
BLOCK_EJECTED: "block:ejected",
}
export const EventSource = {

View File

@ -1287,6 +1287,11 @@ export const getFrontendStore = () => {
return false
}
// Log event
analytics.captureEvent(Events.BLOCK_EJECTED, {
block: block._component,
})
// Attach block children back into ejected definition, using the
// _containsSlot flag to know where to insert them
const slotContainer = findAllMatchingComponents(