diff --git a/src/Umbraco.Web.UI.Client/src/packages/rte/tiptap/property-editors/property-editor-ui-tiptap-toolbar-configuration.element.ts b/src/Umbraco.Web.UI.Client/src/packages/rte/tiptap/property-editors/property-editor-ui-tiptap-toolbar-configuration.element.ts index 966c818db6..5b2067ef1a 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/rte/tiptap/property-editors/property-editor-ui-tiptap-toolbar-configuration.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/rte/tiptap/property-editors/property-editor-ui-tiptap-toolbar-configuration.element.ts @@ -32,7 +32,7 @@ export class UmbPropertyEditorUiTiptapToolbarConfigurationElement } get value(): string[][][] { - return this.#value; + return this.#value.map((rows) => rows.map((groups) => [...groups])); } #value: string[][][] = [[[]]]; @@ -133,7 +133,7 @@ export class UmbPropertyEditorUiTiptapToolbarConfigurationElement }; #removeGroup = (rowIndex: number, groupIndex: number) => { - if (rowIndex === 0 && groupIndex === 0) { + if (groupIndex === 0) { // Prevent removing the last group this.#value[rowIndex][groupIndex] = []; } else { @@ -181,7 +181,7 @@ export class UmbPropertyEditorUiTiptapToolbarConfigurationElement look="primary" color="danger" compact - class="remove-group-button ${rowIndex === 0 && groupIndex === 0 && group.length === 0 ? 'hidden' : undefined}" + class="remove-group-button ${groupIndex === 0 && group.length === 0 ? 'hidden' : undefined}" @click=${() => this.#removeGroup(rowIndex, groupIndex)}> @@ -198,7 +198,7 @@ export class UmbPropertyEditorUiTiptapToolbarConfigurationElement look="primary" color="danger" compact - class="remove-row-button ${rowIndex === 0 && row[rowIndex].length === 0 ? 'hidden' : undefined}" + class="remove-row-button ${rowIndex === 0 && row.length === 1 && row[0].length === 0 ? 'hidden' : undefined}" @click=${() => this.#removeRow(rowIndex)}>