Skip to content

ensure collection is fully reloaded after an archived item is added o… #2386

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 12, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions frontend/src/pages/org/collection-detail.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ export class CollectionDetail extends BtrixElement {
@state()
private isRwpLoaded = false;

@state()
private rwpDoFullReload = false;

@consume({ context: viewStateContext })
viewState?: ViewStateContext;

Expand Down Expand Up @@ -422,6 +425,8 @@ export class CollectionDetail extends BtrixElement {
} catch (e) {
console.warn("Full reload not available in RWP");
}
} else {
this.rwpDoFullReload = true;
}
}

Expand Down Expand Up @@ -903,6 +908,10 @@ export class CollectionDetail extends BtrixElement {
if (!this.isRwpLoaded) {
this.isRwpLoaded = true;
}
if (this.rwpDoFullReload && this.replayEmbed) {
this.replayEmbed.fullReload();
this.rwpDoFullReload = false;
}
}}
></replay-web-page>
</section>`;
Expand Down Expand Up @@ -1044,6 +1053,7 @@ export class CollectionDetail extends BtrixElement {
icon: "check2-circle",
id: "collection-item-remove-status",
});
this.refreshReplay();
void this.fetchCollection();
void this.fetchArchivedItems({
// Update page if last item
Expand Down
Loading