From 493ce1b20cee5689d9b2f2c6730ce0129731f68d Mon Sep 17 00:00:00 2001 From: ta264 Date: Tue, 20 Jul 2021 21:41:57 +0100 Subject: [PATCH] Fixed: Deleting multiple books at once from author page --- .../BookFile/Editor/BookFileEditorTableContent.js | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/frontend/src/BookFile/Editor/BookFileEditorTableContent.js b/frontend/src/BookFile/Editor/BookFileEditorTableContent.js index a7dd7506a..1efeb134b 100644 --- a/frontend/src/BookFile/Editor/BookFileEditorTableContent.js +++ b/frontend/src/BookFile/Editor/BookFileEditorTableContent.js @@ -64,17 +64,8 @@ class BookFileEditorTableContent extends Component { // Control getSelectedIds = () => { - const selectedIds = getSelectedIds(this.state.selectedState); - - return selectedIds.reduce((acc, id) => { - const matchingItem = this.props.items.find((item) => item.id === id); - - if (matchingItem && !acc.includes(matchingItem.bookFileId)) { - acc.push(matchingItem.bookFileId); - } - - return acc; - }, []); + const ids = getSelectedIds(this.state.selectedState); + return ids; } //