set focus on amount (#916)

This commit is contained in:
Tiago Vasconcelos 2022-08-21 22:07:18 +01:00 committed by GitHub
parent 1d55fe1d1a
commit 551c75c2cf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View file

@ -232,6 +232,9 @@ new Vue({
generateChart(this.$refs.canvas, this.payments) generateChart(this.$refs.canvas, this.payments)
}) })
}, },
focusInput(el) {
this.$nextTick(() => this.$refs[el].focus())
},
showReceiveDialog: function () { showReceiveDialog: function () {
this.receive.show = true this.receive.show = true
this.receive.status = 'pending' this.receive.status = 'pending'
@ -243,6 +246,7 @@ new Vue({
this.receive.paymentChecker = null this.receive.paymentChecker = null
this.receive.minMax = [0, 2100000000000000] this.receive.minMax = [0, 2100000000000000]
this.receive.lnurl = null this.receive.lnurl = null
this.focusInput('setAmount')
}, },
showParseDialog: function () { showParseDialog: function () {
this.parse.show = true this.parse.show = true

View file

@ -428,6 +428,7 @@
:options="receive.units" :options="receive.units"
></q-select> ></q-select>
<q-input <q-input
ref="setAmount"
filled filled
dense dense
v-model.number="receive.data.amount" v-model.number="receive.data.amount"