Vue-btn Doesn't Submit On Enter Key
I have this usual login form with submit button on the end, I have to click the button with mouse to submit the button. I want to submit the form with just enter key this is my but
Solution 1:
Move login
method call to form
element and declare v-btn
type
as submit
-
<v-form @submit="login"><v-btncolor="gray"padding="20"data-cy="button-login"type="submit"
>
SIGN IN
</v-btn></v-form>
Solution 2:
You need to wrap your form and <v-btn>
in a <v-form>
component and then use the @submit
event handler on the <v-form>
to handle the form submission. Since you didn't specify the major version of Vuetify that you are using, here is the link to each of the <v-form>
component definitions, depending on your framework version:
Post a Comment for "Vue-btn Doesn't Submit On Enter Key"