From f39094211f28274261f98abaca953d8f95b4e72f Mon Sep 17 00:00:00 2001
From: Aditya Chandel <8075870+adityachandelgit@users.noreply.github.com>
Date: Fri, 17 Oct 2025 22:10:32 -0600
Subject: [PATCH] Fix: update read status correctly when multiple items are
selected in table view (#1382)
---
.../book-browser/book-browser.component.html | 22 +++++++++----------
.../book-browser/book-browser.component.ts | 5 +++++
2 files changed, 15 insertions(+), 12 deletions(-)
diff --git a/booklore-ui/src/app/features/book/components/book-browser/book-browser.component.html b/booklore-ui/src/app/features/book/components/book-browser/book-browser.component.html
index bd4d42ebf..b5d41e36a 100644
--- a/booklore-ui/src/app/features/book/components/book-browser/book-browser.component.html
+++ b/booklore-ui/src/app/features/book/components/book-browser/book-browser.component.html
@@ -257,16 +257,16 @@
}
@@ -384,7 +384,6 @@
}
-
@if (this.showFilter) {
}
-
diff --git a/booklore-ui/src/app/features/book/components/book-browser/book-browser.component.ts b/booklore-ui/src/app/features/book/components/book-browser/book-browser.component.ts
index 14e8a5c41..4139785ae 100644
--- a/booklore-ui/src/app/features/book/components/book-browser/book-browser.component.ts
+++ b/booklore-ui/src/app/features/book/components/book-browser/book-browser.component.ts
@@ -404,6 +404,7 @@ export class BookBrowserComponent implements OnInit {
}
}
}
+ this.tieredMenuItems = this.bookMenuService.getTieredMenuItems(this.selectedBooks);
}
handleBookSelect(bookId: number, selected: boolean): void {
@@ -413,11 +414,13 @@ export class BookBrowserComponent implements OnInit {
this.selectedBooks.delete(bookId);
}
this.isDrawerVisible = this.selectedBooks.size > 0;
+ this.tieredMenuItems = this.bookMenuService.getTieredMenuItems(this.selectedBooks);
}
onSelectedBooksChange(selectedBookIds: Set): void {
this.selectedBooks = new Set(selectedBookIds);
this.isDrawerVisible = this.selectedBooks.size > 0;
+ this.tieredMenuItems = this.bookMenuService.getTieredMenuItems(this.selectedBooks);
}
selectAllBooks(): void {
@@ -428,6 +431,7 @@ export class BookBrowserComponent implements OnInit {
if (this.bookTableComponent) {
this.bookTableComponent.selectAllBooks();
}
+ this.tieredMenuItems = this.bookMenuService.getTieredMenuItems(this.selectedBooks);
}
deselectAllBooks(): void {
@@ -436,6 +440,7 @@ export class BookBrowserComponent implements OnInit {
if (this.bookTableComponent) {
this.bookTableComponent.clearSelectedBooks();
}
+ this.tieredMenuItems = this.bookMenuService.getTieredMenuItems(this.selectedBooks);
}
confirmDeleteBooks(): void {