Auto-select text when editing costs for receiving

This commit is contained in:
Lance Edgar 2023-08-18 15:04:52 -05:00
parent a007606863
commit b2aea57da6

View file

@ -103,6 +103,7 @@
ref="input" ref="input"
v-show="editing" v-show="editing"
@keydown.native="inputKeyDown" @keydown.native="inputKeyDown"
@focus="selectAll"
@blur="inputBlur" @blur="inputBlur"
style="width: 6rem;"> style="width: 6rem;">
</b-input> </b-input>
@ -189,6 +190,12 @@
}, },
methods: { methods: {
selectAll() {
// nb. must traverse into the <b-input> element
let trueInput = this.$refs.input.$el.firstChild
trueInput.select()
},
startEdit() { startEdit() {
this.inputValue = this.value this.inputValue = this.value
this.editing = true this.editing = true