Skip to content

Custom targetAttributeForScope breaks target lifecycle callbacks #809

@koenkivits

Description

@koenkivits

When using a custom targetAttributeForScope callback, target (dis)connected callbacks no longer work. This seems to be because TargetObserver hardcodes the default attribute format:

private get attributeName() {
return `data-${this.context.identifier}-target`
}

All target properties on the controller ([name]Target, has[Name]Target, etc) do work as expected.

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