Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

Commit

Permalink
Change the form's behaviour to use submission as the event trigger
Browse files Browse the repository at this point in the history
  • Loading branch information
dhruvkb committed Nov 4, 2021
1 parent b65f224 commit e8e9ab8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/components/Header/SearchBar/SearchBar.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<form class="search-bar group flex flex-row">
<form class="search-bar group flex flex-row" @submit.prevent="handleSearch">
<InputField
v-model="text"
class="flex-grow input-field"
Expand All @@ -10,7 +10,7 @@
>
{{ extraText }}
</InputField>
<SearchButton @click="handleSearch" />
<SearchButton type="submit" />
</form>
</template>

Expand Down
4 changes: 2 additions & 2 deletions src/components/Header/SearchBar/meta/SearchBar.stories.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import SearchBar from '~/components/Header/SearchBar/SearchBar.vue'
input: {
action: 'input',
},
searched: {
action: 'searched',
search: {
action: 'search',
},
}}
/>
Expand Down

0 comments on commit e8e9ab8

Please sign in to comment.