Skip to content

Commit

Permalink
Merge pull request #1713 from bcgov/feature/ALCS-1956
Browse files Browse the repository at this point in the history
fix scroll to top of results in ACLS advanced search and public search
  • Loading branch information
Abradat authored May 24, 2024
2 parents c90af10 + 0f9784a commit 64295ba
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion alcs-frontend/src/app/features/search/search.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ export class SearchComponent implements OnInit, OnDestroy {
if (element) {
element.scrollIntoView({
behavior: 'smooth',
block: 'center',
block: 'start',
inline: 'center',
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,9 @@ export class PublicSearchComponent implements OnInit, OnDestroy {
// push tab activation to next render cycle, after the tabGroup is rendered
setTimeout(() => {
this.setActiveTab();
setTimeout(() => {
scrollToElement({ id: `results`, center: false });
});
});
}

Expand Down

0 comments on commit 64295ba

Please sign in to comment.