diff --git a/client/web/compose/src/components/PageBlocks/RecordListBase.vue b/client/web/compose/src/components/PageBlocks/RecordListBase.vue index 3b4db1969..4bc33a53a 100644 --- a/client/web/compose/src/components/PageBlocks/RecordListBase.vue +++ b/client/web/compose/src/components/PageBlocks/RecordListBase.vue @@ -173,6 +173,7 @@ - - - @@ -360,7 +335,8 @@ {{ $t('recordList.record.tooltip.restore') }} @@ -1515,7 +1491,7 @@ export default { this.handleSelectAllOnPage({ isChecked: this.selectedAllRecords }) }, - handleRestoreSelectedRecords (selected = this.selected) { + handleRestoreSelectedRecords (recordID) { if (this.inlineEditing) { const sel = new Set(this.selected) this.items.forEach((item, index) => { @@ -1526,7 +1502,7 @@ export default { } else { this.processing = true - const query = this.bulkQuery + const query = recordID ? `recordID = ${recordID}` : this.bulkQuery const { moduleID, namespaceID } = this.filter this.$ComposeAPI @@ -1543,13 +1519,9 @@ export default { } }, - handleDeleteSelectedRecords (selected = this.selected) { - if (selected.length === 0) { - return - } - + handleDeleteSelectedRecords (recordID) { if (this.inlineEditing) { - const sel = new Set(selected) + const sel = new Set(this.selected) for (let i = 0; i < this.items.length; i++) { if (sel.has(this.items[i].id)) { this.handleDeleteInline(this.items[i], i) @@ -1558,7 +1530,7 @@ export default { } else { this.processing = true - const query = this.bulkQuery + const query = recordID ? `recordID = ${recordID}` : this.bulkQuery // Pick module and namespace ID from the filter const { moduleID, namespaceID } = this.filter