Skip to content

[LiveComponent] Setting custom live-id in template not working anymore (since 2.14) #1472

Closed
@tijnema

Description

@tijnema

Hi,

We've been generating a custom live-id inside components for a while now, which fixes a lot of reloading issues (including #1470 ). Since release 2.14 however, this no longer works as expected.

I've created a reproducer project: https://github.com/tijnema/livebug2
Currently it is running with live components 2.13, pressing the button will reload the parent (render time will update), and childs are not being updated.
When upgrading the reproducer to 2.14, clicking the rerender button will reload all 100 child components (see the 102 network request in debug bar).

We set the live-id in the template like this:

<div {{ attributes.without('data-live-id').defaults({'data-live-id': this.liveId}) }}>

I haven't found a better way to set the live-id inside a component (docs mention only setting it as argument when creating the component).
Maybe live components can have a method for generating a live id?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions