Skip to content

Lifecycle methods not triggered #169

@Mobe91

Description

@Mobe91

I'm submitting a bug report

  • Library Version:
    1.0.0-beta.7

Current behavior:

The caveats section states:

virtualization requires appropriate removing and inserting visible items, corresponding lifecycle of items view will also be triggered while inserting (bind, attached) or removing (unbind, detached)

Maybe I am misunderstanding this statement. Consider the following virtual repeat:

<div virtual-repeat.for="item of items" infinite-scroll-next="getMore">
  <my-item-view item.bind="item"></my-item-view>
</div>

I would expect the lifecycle methods on the controller for my-item-view to be invoked whenever new items are added/removed from the virtual repeat when the user scrolls. But this is not the case. The item controller lifecycle methods are only invoked a couple of times when the page is initially rendered.

Expected/desired behavior:

The lifecycle methods bind(), attached() / unbind(), detached() are invoked on the my-item-view controller when items are added / removed from the virtual repeat.

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