DEV Community

loading...

Discussion on: If there is an input, there should be a form

Collapse
tomekdev_ profile image
🤓 Tomek Nieżurawski Author

I'm not very familiar with Vue but I think you can omit:

@keydown.enter="doSearch"
Enter fullscreen mode Exit fullscreen mode

The beauty of <form></form> + <button type="submit">Submit</button> is that you don't have to manually handle ENTER key on an input. Which is very convenient if you have multiple inputs :)