I am working with an angular component and encountering the following code:
@Output() fixPercentChanged = new EventEmitter<number>();
In addition, I have this event:
fixChanged(e) {
setTimeout(() => {
let fix = e.component.option('value');
this.fixPercentChanged.emit(100 - fix);
}, 100);
}
This event is connected to a keydown event of an input element in the markup:
<dxi-item dataField="fix" [label]="{text: 'Fix %'}" editorType="dxNumberBox"
[editorOptions]="{format: '#,##0.00\'%\'', onKeyDown: fixChanged, valueChangeEvent: 'keyup'}">
<dxi-validation-rule type="required" message="A mező kitöltése kötelező"></dxi-validation-rule>
</dxi-item>
While the event is triggered, there seems to be an issue as the console indicates that fixPercentChanged
is undefined. Upon printing this
to the console, it returns the dx-number-box
input element instead of referring to the component itself. Is there a way to modify the function to resolve this?