I have a footer with multiple divs that can be scrolled horizontally. For horizontal scrolling I’ve used ion-scroll. Now if I click on any of these div then all the divs should get scrolled automatically so as to bring the clicked div to the center position of the footer view.
I tried scrollTo and scrollIntoView but these didn’t work. I need the help to get this implementation done.
Hi, can you please show me your source code? (view, controller)
<ion-footer>
<ion-toolbar>
<ion-scroll direction="x" scrollX="true" class="wide-as-needed" id="test" overflow-scroll="false">
<div [attr.id]="'polygon-' + i" *ngFor="let item of myList; let i=index" (click)="OnDivClick(item)" class="PolygonDiv">
<polygon [summaryList]="item"></polygon>
</div>
</ion-scroll>
</ion-toolbar>
</ion-footer>
Here I’m looping over a list to create multiple div which contain the custom component. On click on any of these divs I want that div to be scrolled automatically to the center of the footer.
have you found the solution?
@nik2nik have you find any solution. I’m also stuck on a issue something like this. And not being able to find any solution. If you have solved this problem then it might can help me in my case as well.
thanks