Skip to content

feat: How do you trigger a collection-repeat resize() in v1.0.0-rc0? #3292

@mixersoft

Description

@mixersoft

Type: feat

Platform: all

I'm not sure if this is a bug or not, but in beta14 I was able to force the collection-repeat directive to recalculate dimensions and re-render with a call like this, $ionicScrollDelegate.$getByHandle('collection-repeat-wrap').resize(). This no longer seems to work with the new, refactored collection-repeat from 1.0.0-rc0

    $ionicScrollDelegate.$getByHandle('collection-repeat-wrap').resize()
   // trying to get collection-repeat directive to run this code:
    var onWindowResize = ionic.animationFrameThrottle(validateResize);
    angular.element($window).on('resize', onWindowResize);
     <ion-content delegate-handle="collection-repeat-wrap">
      <div collection-repeat="item in items">
        ...
      </div>
    </ion-content>

Is there a better way to do this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions