I am encountering an issue with my input component where pressing enter redirects me to the parent component. Even adding a @keyup event does not solve the problem.
Could this be happening because I am in a child component? How can I prevent the enter key action?
<div class="form-field">
<input v-model="userInput" :placeholder="$t('findCenter.placeholder')" type="text">
<div class="btn primary" @click="getFromAddress()">{{ $t('findCenter.cta') }}</div>
</div>
<div class="form-field">
<input @keyup.enter="getFromAddress()" v-model="userInput" :placeholder="$t('findCenter.placeholder')" type="text">
<div class="btn primary" @click="getFromAddress()">{{ $t('findCenter.cta') }}</div>
</div>