diff --git a/src/Umbraco.Web.UI.Client/src/packages/block/block-grid/property-editors/block-grid-editor/property-editor-ui-block-grid.element.ts b/src/Umbraco.Web.UI.Client/src/packages/block/block-grid/property-editors/block-grid-editor/property-editor-ui-block-grid.element.ts index 7da4fc8061..ba9f5b71b0 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/block/block-grid/property-editors/block-grid-editor/property-editor-ui-block-grid.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/block/block-grid/property-editors/block-grid-editor/property-editor-ui-block-grid.element.ts @@ -76,18 +76,27 @@ export class UmbPropertyEditorUIBlockGridElement extends UmbLitElement implement // TODO: Prevent initial notification from these observes: this.observe(this.#context.layouts, (layouts) => { this._value = { ...this._value, layout: { [UMB_BLOCK_GRID_PROPERTY_EDITOR_ALIAS]: layouts } }; - this.dispatchEvent(new UmbPropertyValueChangeEvent()); + this.#fireChangeEvent(); }); this.observe(this.#context.contents, (contents) => { this._value = { ...this._value, contentData: contents }; - this.dispatchEvent(new UmbPropertyValueChangeEvent()); + this.#fireChangeEvent(); }); this.observe(this.#context.settings, (settings) => { this._value = { ...this._value, settingsData: settings }; - this.dispatchEvent(new UmbPropertyValueChangeEvent()); + this.#fireChangeEvent(); }); } + #debounceChangeEvent?: boolean; + #fireChangeEvent = async () => { + if (this.#debounceChangeEvent) return; + this.#debounceChangeEvent = true; + await Promise.resolve(); + this.dispatchEvent(new UmbPropertyValueChangeEvent()); + this.#debounceChangeEvent = false; + }; + protected firstUpdated(_changedProperties: PropertyValueMap | Map): void { super.firstUpdated(_changedProperties);