From d561928db8e99996da4918654aa1e95d381b2372 Mon Sep 17 00:00:00 2001 From: "Enjeck C." Date: Tue, 5 Aug 2025 05:14:17 +0100 Subject: [PATCH 1/4] fix: Remove nbsp in component test widget Signed-off-by: Enjeck C. --- src/views/ContentReferenceWidget.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/ContentReferenceWidget.vue b/src/views/ContentReferenceWidget.vue index 30e9e5ee69..64d5c8d8bc 100644 --- a/src/views/ContentReferenceWidget.vue +++ b/src/views/ContentReferenceWidget.vue @@ -6,8 +6,8 @@

- - {{ richObject.emoji }} {{ richObject.title }} + + {{ richObject.emoji }} {{ richObject.title }}

Date: Tue, 5 Aug 2025 07:31:21 +0100 Subject: [PATCH 2/4] feat: Inline editing - Selection Signed-off-by: Enjeck C. --- .../partials/TableCellMultiSelection.vue | 149 ++++++++++++++++-- .../ncTable/partials/TableCellSelection.vue | 113 ++++++++++++- .../components/ncTable/partials/TableRow.vue | 2 - 3 files changed, 248 insertions(+), 16 deletions(-) diff --git a/src/shared/components/ncTable/partials/TableCellMultiSelection.vue b/src/shared/components/ncTable/partials/TableCellMultiSelection.vue index f7c9c8a116..87f5d5d5ea 100644 --- a/src/shared/components/ncTable/partials/TableCellMultiSelection.vue +++ b/src/shared/components/ncTable/partials/TableCellMultiSelection.vue @@ -3,22 +3,48 @@ - SPDX-License-Identifier: AGPL-3.0-or-later --> diff --git a/src/shared/components/ncTable/partials/TableCellSelection.vue b/src/shared/components/ncTable/partials/TableCellSelection.vue index 03d32a0ca6..7eac0d7232 100644 --- a/src/shared/components/ncTable/partials/TableCellSelection.vue +++ b/src/shared/components/ncTable/partials/TableCellSelection.vue @@ -3,18 +3,42 @@ - SPDX-License-Identifier: AGPL-3.0-or-later --> diff --git a/src/shared/components/ncTable/partials/TableRow.vue b/src/shared/components/ncTable/partials/TableRow.vue index e5579220de..f3a268d7ed 100644 --- a/src/shared/components/ncTable/partials/TableRow.vue +++ b/src/shared/components/ncTable/partials/TableRow.vue @@ -114,11 +114,9 @@ export default { nonInlineEditableColumnTypes() { return [ ColumnTypes.TextRich, - ColumnTypes.SelectionMulti, ColumnTypes.Datetime, ColumnTypes.DatetimeDate, ColumnTypes.DatetimeTime, - ColumnTypes.Selection, ] }, }, From e68c312e51e162ef2f05e0288a07a60368f1c91c Mon Sep 17 00:00:00 2001 From: "Enjeck C." Date: Thu, 14 Aug 2025 05:56:08 +0100 Subject: [PATCH 3/4] fix: Improve keyboard event handling and add clearable option in selection components Signed-off-by: Enjeck C. --- .../partials/TableCellMultiSelection.vue | 35 +++++++++++++++---- .../ncTable/partials/TableCellSelection.vue | 5 +-- 2 files changed, 31 insertions(+), 9 deletions(-) diff --git a/src/shared/components/ncTable/partials/TableCellMultiSelection.vue b/src/shared/components/ncTable/partials/TableCellMultiSelection.vue index 87f5d5d5ea..fa52aa2271 100644 --- a/src/shared/components/ncTable/partials/TableCellMultiSelection.vue +++ b/src/shared/components/ncTable/partials/TableCellMultiSelection.vue @@ -15,14 +15,15 @@ ref="editingContainer" class="edit-mode" tabindex="0" - @keydown.enter="saveChanges" - @keydown.escape="cancelEdit"> + @keydown.enter.stop="saveChanges" + @keydown.escape.stop="cancelEdit">
@@ -62,6 +63,12 @@ export default { }, }, + data() { + return { + localEditValues: [], + } + }, + computed: { getOptions() { return this.column.selectionOptions || [] @@ -78,6 +85,14 @@ export default { }) return options }, + editValues: { + get() { + return this.localEditValues + }, + set(newValues) { + this.localEditValues = newValues || [] + }, + }, }, watch: { @@ -86,13 +101,13 @@ export default { this.initEditValues() // Use a small delay to prevent the same click event that triggered editing // from immediately triggering the click outside handler + // TODO: implement better click outside detection without setTimeout this.$nextTick(() => { setTimeout(() => { document.addEventListener('click', this.handleClickOutside) - }, 10) + }, 100) }) } else { - // Remove click outside listener document.removeEventListener('click', this.handleClickOutside) } }, @@ -120,11 +135,16 @@ export default { initEditValues() { if (this.value !== null) { - this.editValues = this.column.getObjects(this.value) + this.localEditValues = this.column.getObjects(this.value) } else { - this.editValues = [] + this.localEditValues = [] } }, + cancelEdit() { + this.isEditing = false + this.localEditValues = [] + }, + async saveChanges() { if (this.localLoading) { return @@ -135,7 +155,7 @@ export default { const success = await this.updateCellValue(newValue) if (success) { - // Emit the updated value to parent to trigger immediate re-render + // trigger immediate re-render this.$emit('input', newValue) this.$emit('update:value', newValue) this.isEditing = false @@ -148,6 +168,7 @@ export default { handleClickOutside(event) { // Check if the click is outside the editing container + // But ignore clicks on dropdown options and scrollbars if (this.$refs.editingContainer && !this.$refs.editingContainer.contains(event.target)) { this.saveChanges() } diff --git a/src/shared/components/ncTable/partials/TableCellSelection.vue b/src/shared/components/ncTable/partials/TableCellSelection.vue index 7eac0d7232..efe71a73ec 100644 --- a/src/shared/components/ncTable/partials/TableCellSelection.vue +++ b/src/shared/components/ncTable/partials/TableCellSelection.vue @@ -11,8 +11,8 @@ ref="editingContainer" class="edit-mode" tabindex="0" - @keydown.enter="saveChanges" - @keydown.escape="cancelEdit"> + @keydown.enter.stop="saveChanges" + @keydown.escape.stop="cancelEdit"> { setTimeout(() => { document.addEventListener('click', this.handleClickOutside) From c7ddc9f0e188cb4d3c977a2331715fdf4f586f75 Mon Sep 17 00:00:00 2001 From: "Enjeck C." Date: Sun, 17 Aug 2025 14:30:21 +0100 Subject: [PATCH 4/4] fix: Add border styling and refactor Signed-off-by: Enjeck C. --- .../partials/TableCellMultiSelection.vue | 26 ++++++++++---- .../ncTable/partials/TableCellSelection.vue | 36 +++++++++++++++---- 2 files changed, 48 insertions(+), 14 deletions(-) diff --git a/src/shared/components/ncTable/partials/TableCellMultiSelection.vue b/src/shared/components/ncTable/partials/TableCellMultiSelection.vue index fa52aa2271..9624485a04 100644 --- a/src/shared/components/ncTable/partials/TableCellMultiSelection.vue +++ b/src/shared/components/ncTable/partials/TableCellMultiSelection.vue @@ -4,7 +4,7 @@ -->