Hide the bucket limit input when clicked away

This commit is contained in:
kolaente 2021-04-15 17:03:26 +02:00
parent 48fb707032
commit f9844384be
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B
2 changed files with 3 additions and 0 deletions

View file

@ -42,6 +42,7 @@ export default {
if (this.open) { if (this.open) {
closeWhenClickedOutside(e, this.$refs.dropdown, () => { closeWhenClickedOutside(e, this.$refs.dropdown, () => {
this.open = false this.open = false
this.$emit('close', e)
}) })
} }
}, },

View file

@ -43,6 +43,7 @@
class="is-right options" class="is-right options"
v-if="canWrite" v-if="canWrite"
trigger-icon="ellipsis-v" trigger-icon="ellipsis-v"
@close="() => showSetLimitInput = false"
> >
<a <a
@click.stop="showSetLimitInput = true" @click.stop="showSetLimitInput = true"
@ -53,6 +54,7 @@
<input <input
@change="() => setBucketLimit(bucket)" @change="() => setBucketLimit(bucket)"
@keyup.enter="() => setBucketLimit(bucket)" @keyup.enter="() => setBucketLimit(bucket)"
@keyup.esc="() => showSetLimitInput = false"
class="input" class="input"
type="number" type="number"
min="0" min="0"