Capture up and down keys for incrimenting numerical property
This commit is contained in:
parent
484c7a757e
commit
ec33812b52
1 changed files with 11 additions and 1 deletions
|
|
@ -28,7 +28,6 @@
|
|||
type="number"
|
||||
:min="minimum"
|
||||
:max="maximum"
|
||||
@wheel="handleSpiner"
|
||||
@input="grabFocus"
|
||||
@focusout="focusOut"
|
||||
@keydown="keyDown"
|
||||
|
|
@ -378,6 +377,17 @@ export default {
|
|||
if (event.keyCode == 13) {
|
||||
this.sendValue();
|
||||
}
|
||||
// If numeric then capture Up and Down keys for incrementing.
|
||||
if (this.dataType === "number") {
|
||||
if (event.key === "ArrowUp") {
|
||||
event.preventDefault();
|
||||
this.increment(1);
|
||||
}
|
||||
if (event.key === "ArrowDown") {
|
||||
event.preventDefault();
|
||||
this.increment(-1);
|
||||
}
|
||||
}
|
||||
},
|
||||
updateIsEdited: function () {
|
||||
this.isEdited =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue