Auto-select text when editing costs for receiving
This commit is contained in:
parent
a007606863
commit
b2aea57da6
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue