Skip to content

Commit 2765a85

Browse files
jr-rkclaude
andcommitted
docs(statistics): explain deferred pagination-param cleanup accurately
The stale stats-* params only survive 'merge' navigations (e.g. the navbar search form); plain navigations drop them. Clarify that clearPagination stages nulls applied on the service's next updateRoute, and why no navigation is issued from ngOnDestroy (racing the in-flight navigation). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent cfc036f commit 2765a85

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

src/app/statistics-page/statistics-table/statistics-table.component.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,12 @@ export class StatisticsTableComponent implements OnInit, OnDestroy {
112112
}
113113

114114
ngOnDestroy() {
115-
// Drop this table's page/rpp query params so they don't leak (via queryParamsHandling: 'merge') to the next
116-
// scope's statistics page. Guarded in case the component is destroyed before ngOnInit ran.
115+
// Stage this table's stats-* params for removal. Plain navigations drop query params anyway, but
116+
// 'merge' navigations (e.g. the navbar search form) carry them along; PaginationService applies the
117+
// staged nulls on its next updateRoute, scrubbing them from the URL. Deliberately NOT navigating from
118+
// here: several tables are destroyed at once and an eager update would race the in-flight navigation.
119+
// Same idiom as the other paginated components. Guarded in case the component is destroyed before
120+
// ngOnInit ran.
117121
if (this.paginationOptions) {
118122
this.paginationService.clearPagination(this.paginationOptions.id);
119123
}

0 commit comments

Comments
 (0)