Disable search button if search field is empty

Closes #269
This commit is contained in:
Dany Marcoux 2019-11-07 00:18:41 +01:00
parent ddbe637c34
commit 6450121167
No known key found for this signature in database
GPG key ID: 2E558BC282FA5A4A

View file

@ -7,7 +7,7 @@
<b-field :label="$t('Event')" grouped label-position="on-border">
<b-input icon="magnify" type="search" size="is-large" expanded v-model="searchTerm" :placeholder="$t('For instance: London, Taekwondo, Architecture…')" />
<p class="control">
<b-button @click="submit" type="is-info" size="is-large">{{ $t('Search') }}</b-button>
<b-button @click="submit" type="is-info" size="is-large" v-bind:disabled="searchTerm.trim().length === 0">{{ $t('Search') }}</b-button>
</p>
</b-field>
</form>