Skip to content

Nesting self-updating components. #263

Closed
@dxlbnl

Description

@dxlbnl

I've come across an issue, where onrender of a component isn't always called when it is being mounted.

I've created an example here.
It's got 3 components: Root -> List -> Item
List is being updated asynchronously. and it's adding some items to it's data.
The initial set of Items, from list is being rendered correctly. But the new elements rendered by the other values, are not being updated.

The problem lies in this generated code:

  if ( options._root ) {
    options._root._renderHooks.push({ fn: template$2.onrender, context: this });
  } else {
    template$2.onrender.call( this );
  }

options._root is the Root element. But that element is never updated, so it's _renderHooks are never called.
I can verify this by calling .set({}) on the root element.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions