'Disable scrolling to top when trigger any HTTP request

Does anyone know how to disable scrolling to the top when running any HTTP request? This happens to me with every single HTTP request. Is it possible to stay in the current position when the API is triggered? I use Angular 11.

Main history component:

I have a main "history" component which as a child component contains a number of "card" components.

<div *ngFor="let report of reports>
    <card [report]="report"></card>
</div>

Child card component:

In the child "card" component when I click on the button, I call the function in which the API call is triggered, and then while the API data is loading the page scrolls to the top.

 <span (click)="checkOptions(report.id)">
   Check download options
 </span>


  checkOptions(id): void {
    this.mainService.getOptions({
      id: id
    }).subscribe((data) => {
      this.options = data;
  }


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source