-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
Hi !
I use the fire() method, but instead of using a (click)="...", I use the reference in the component :
@ViewChild('triggerElt') triggerElt!: RiveSMInput;
ngAfterViewInit() {
this.triggerElt.fire();
}
It fails with this error :
Uncaught TypeError: input.fire is not a function
After some investigations, this comes from the "shouldFire" mechanism.
On the init method, input is used instead of this.input. I don't know how the getInput() function works, but it seems that the input object is not complete before going through :
init(input) {
if (!input || input.name === this.input?.name)
return;
this.input = getInput(input);
this.load.emit(input);
if (typeof this._value !== 'undefined') {
this.input.value = this._value;
this.change.emit(this.input);
}
if (this.shouldFire) {
this.shouldFire(input); // <---- this line should be "this.shouldFire(this.input);"
delete this.shouldFire;
}
}
Am I wrong ? This solves my problem...
Thanks !
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels