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