Skip to content

Dynamic [minBottomVisible] causes "changes.state is undefined" #52

Description

@SENAHK

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions