I have a simple mat-input component that whenever I delete its content it shows [object HTMLInputElement] instead of empty field.
Here is a working stackblitz of the problem.
For project purposes I need to listen to every change of the input (not just when out of focus, but every input char).
How to reproduce the error?
Just put some input in the text field and then delete it, it will show [object HTMLInputElement] instead of an empty string.
I've added a console.log in the handleInputChange method that handles every change of text in the input field. By looking at the logs I saw that event.target.value has (correctly) the value of the inserted input, but then when deleting the input it has [object HTMLInputElement] and not an empty string as I would expect. Why is this happening?