Custom `targetAttributeForScope` breaks target lifecycle callbacks
When using a custom targetAttributeForScope callback, target (dis)connected callbacks no longer work. This seems to be because TargetObserver hardcodes the default attribute format:
stimulus/src/core/target_observer.ts
Lines 75 to 77 in 101a060
| 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.