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