fix: reopen the merge dialog after dismissing it
This commit is contained in:
@@ -242,7 +242,16 @@
|
||||
<MergeBooks
|
||||
books={mergingBooks}
|
||||
libraryId={libraryState.activeLibrary!.id}
|
||||
open={true}
|
||||
bind:open={
|
||||
() => mergingBooks !== null,
|
||||
(value) => {
|
||||
// Bound, not passed as a bare `true`: the dialog closes itself on an
|
||||
// outside click or Escape, and if that never reaches `mergingBooks`
|
||||
// the snapshot stays set — the button then re-assigns the same
|
||||
// selection, nothing changes, and the dialog never reopens.
|
||||
if (!value) mergingBooks = null;
|
||||
}
|
||||
}
|
||||
onmerged={(_survivor, folded) => {
|
||||
// Only the folded records are gone; the survivor is still in the library.
|
||||
libraryState.activeLibrary!.total! -= folded.length;
|
||||
|
||||
Reference in New Issue
Block a user