[web-src] Fix "Update" dropdown not closing on click-outside

This commit is contained in:
chme 2020-10-17 07:50:37 +02:00
parent 5c3c0be348
commit 2fe5cc722d

View File

@ -26,7 +26,7 @@
<!-- Right side --> <!-- Right side -->
<div class="level-right"> <div class="level-right">
<div v-if="library.updating"><a class="button is-small is-loading">Update</a></div> <div v-if="library.updating"><a class="button is-small is-loading">Update</a></div>
<div v-else class="dropdown is-right" :class="{ 'is-active': show_update_dropdown }"> <div v-else class="dropdown is-right" :class="{ 'is-active': show_update_dropdown }" v-click-outside="onClickOutside">
<div class="dropdown-trigger"> <div class="dropdown-trigger">
<div class="buttons has-addons"> <div class="buttons has-addons">
<a @click="update" class="button is-small">Update</a> <a @click="update" class="button is-small">Update</a>
@ -126,6 +126,10 @@ export default {
}, },
methods: { methods: {
onClickOutside (event) {
this.show_update_dropdown = false
},
update: function () { update: function () {
this.show_update_dropdown = false this.show_update_dropdown = false
webapi.library_update() webapi.library_update()