Restore vertical scrollbar position of panels after refresh

I'm using angular 6 and I have a page with several primeNg panel (component created with recursion) and I would like to restore the position of each scrollbar after an event that reload all of them. I set an id for each panel(and saved all into a service) and I tried with

document.getElementById('_bi6edk4e5').scrollTop

but always return 0 and with

document.getElementById('_bi6edk4e5').offsetTop

but return always the same value even if I scroll down.

This is the piece of code where I set the id:

<div id="{{idCard}}" class="div-container" *ngIf="(currentCard.propName || currentCard.name).toLowerCase().includes(inputWordInSearch) || inputIsInSearchMode==false " [ngClass]="{'minicard-style': !isToggleable || !(depth < maxLevelJsonSchema)}" >
    <p-panel [collapsed]="!isToggleable || !(depth < maxLevelJsonSchema)" [toggleable]="isToggleable && (depth < maxLevelJsonSchema)" (click)="cardClickedEvent()" expandIcon="pi pi-chevron-up" collapseIcon="pi pi-chevron-down">

I tried even in p-panel with the same result. Can You help me?