0👍
If you take a look at this answer : https://stackoverflow.com/a/3396805/5543999
You will see that with the event on key press, the input is not already altered.
Change your @keypress
for @keyup
and everything should work properly.
Source:stackexchange.com