Enable resetting search input
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
8592652e5b
commit
0953400321
@ -19,8 +19,7 @@
|
||||
<button
|
||||
class="button noshadow is-primary"
|
||||
@click="searchTasks"
|
||||
:class="{'is-loading': taskCollectionService.loading}"
|
||||
:disabled="searchTerm === ''">
|
||||
:class="{'is-loading': taskCollectionService.loading}">
|
||||
Search
|
||||
</button>
|
||||
</div>
|
||||
|
@ -112,9 +112,11 @@ export default {
|
||||
})
|
||||
},
|
||||
searchTasks() {
|
||||
if (this.searchTerm === '') {
|
||||
// Only search if the search term changed
|
||||
if (this.$route.query === this.searchTerm) {
|
||||
return
|
||||
}
|
||||
|
||||
this.$router.push({
|
||||
name: 'list.list',
|
||||
query: {search: this.searchTerm}
|
||||
|
Reference in New Issue
Block a user