Skip to content

Commit

Permalink
Merge pull request #125 from traPtitech/fix/searchingbox
Browse files Browse the repository at this point in the history
検索ボックスが空欄の時にEnterを押しても飛ばないようにした
  • Loading branch information
sh0go07 authored May 20, 2024
2 parents c7ed725 + 98d5bdd commit 36c3b06
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/UI/SearchInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ const router = useRouter()
const input = ref('')
const submit = () => {
// 検索結果ページへ遷移
router.push({ name: 'UserSearch', query: { q: input.value } })
if (input.value !== '') {
router.push({ name: 'UserSearch', query: { q: input.value } })
}
}
const iconSize = computed(() => {
if (props.size === 'large') return 36
Expand Down

0 comments on commit 36c3b06

Please sign in to comment.