fix(ivy): generate proper event listener names for animation events (FW-800) (#27525)
Prior to this change, animation event names were treated as a regular event names, stripping `@` symbol and event phase. As a result, event listeners were not invoked during animations. Now animation event name is formatted as needed and the necessary callbacks are invoked. PR Close #27525
This commit is contained in:

committed by
Alex Rickabaugh

parent
6316051967
commit
dcb44e6dea
@ -49,14 +49,14 @@ export class BoundAttribute implements Node {
|
||||
|
||||
export class BoundEvent implements Node {
|
||||
constructor(
|
||||
public name: string, public handler: AST, public target: string|null,
|
||||
public phase: string|null, public sourceSpan: ParseSourceSpan) {}
|
||||
public name: string, public type: ParsedEventType, public handler: AST,
|
||||
public target: string|null, public phase: string|null, public sourceSpan: ParseSourceSpan) {}
|
||||
|
||||
static fromParsedEvent(event: ParsedEvent) {
|
||||
const target: string|null = event.type === ParsedEventType.Regular ? event.targetOrPhase : null;
|
||||
const phase: string|null =
|
||||
event.type === ParsedEventType.Animation ? event.targetOrPhase : null;
|
||||
return new BoundEvent(event.name, event.handler, target, phase, event.sourceSpan);
|
||||
return new BoundEvent(event.name, event.type, event.handler, target, phase, event.sourceSpan);
|
||||
}
|
||||
|
||||
visit<Result>(visitor: Visitor<Result>): Result { return visitor.visitBoundEvent(this); }
|
||||
|
Reference in New Issue
Block a user