New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Horizontal scroll ionic2 #158
Comments
Hi, I guess that <ion-scroll scrollX="true" #lazyContainer>
<img class="thumbnail-avatar-square spacer" *ngFor="let item of recent"
(click)="tapped(item)"
[scrollObservable]="lazyContainer.ionScroll"
[lazyLoad]="item.avatar">
{{ lazyContainer.ionScroll | async | json }}
</ion-scroll> |
@kodeine please feel free to reopen this issue if the problem still occurs |
Hi there, First... @tjoskar congratulations. This work as expected on Ionic 3.9.2. However, I have the same issue with ion-scroll. I just tried to print the value of ionScroll with the async/json pipe and is returning null. So I guess that's the reason is not working. Any workaround for this ionic issue? |
Update: I tried the same with a working example and also ionScroll is returning null? |
Got it working. The key is to set scrollTarget to Full code below <ion-scroll scrollX="true" direction="x" #scroll1>
<div class="item" margin *ngFor="let item of newItems"
(click)="goToItemPage(item)">
<img src="./assets/imgs/placeholder.png"
[lazyLoad]="item.photoThumb?.url()"
[scrollTarget]="scroll1._scrollContent.nativeElement" />
<div text-center text-wrap>
<p no-margin>{{ (item.shortName || item.name) | excerpt:17 }}</p>
</div>
</div>
</ion-scroll>
` |
Hi @fmendoza I have multiple rows where each should be horizontally scrollable and lazy load images |
I've used the below hack to workaround the issue of having a horizontally scrolled list being outside the viewport of the main content's vertical scroll.
|
Following does not load the image on horizontal scroll.
The text was updated successfully, but these errors were encountered: