-
Notifications
You must be signed in to change notification settings - Fork 42
Open
Description
Hi,
I'm trying to make a dynamic pullup that will fit (in collapsed state) the remaining space after an img's src has loaded (it can take at least a few seconds). Currently I'm simply assigning minBottomVisible to a variable that changes when load event of img is fired.
HTML
<ion-content id="content-img">
<div height="70%" id="imgDiv" #img>
<img height="100%" [src]="this.imgSrc" (load)="ImgHasLoaded()">
</div>
</ion-content>
<lib-ionic-pullup (onExpand)="footerExpanded()" (onCollapse)="footerCollapsed()" [(state)]="footerState"
[toolbarTopMargin]="100" [minBottomVisible]="this.height">
<ion-toolbar id="toolbar-pullup" (click)="toggleFooter()">
<div class="handle">
<div class="bar">
</div>
</div>
</ion-toolbar>
<ion-content>
</ion-content>
</lib-ionic-pullup>height = 150;
footerState: IonPullUpFooterState;
constructor(){
this.footerState = IonPullUpFooterState.Collapsed;
}
ImgHasLoaded(){
this.height = window.innerHeight - this.img.nativeElement.clientHeight
}Unfortunately, it causes an error:
ERROR TypeError: "changes.state is undefined"
@ ngOnChanges ionic-pullup.js:357
Any ideas ?
Version is ionic/angular 5.1.0
Metadata
Metadata
Assignees
Labels
No labels