Fixed Knob arrow key support
parent
97e4bf8fd6
commit
6409ea81c5
|
@ -168,14 +168,14 @@ export default {
|
||||||
onKeyDown(event) {
|
onKeyDown(event) {
|
||||||
if (!this.disabled && !this.readonly) {
|
if (!this.disabled && !this.readonly) {
|
||||||
switch (event.code) {
|
switch (event.code) {
|
||||||
case 'ArrowLeft':
|
case 'ArrowRight':
|
||||||
case 'ArrowUp': {
|
case 'ArrowUp': {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
this.updateModelValue(this.modelValue + 1);
|
this.updateModelValue(this.modelValue + 1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case 'ArrowRight':
|
case 'ArrowLeft':
|
||||||
case 'ArrowDown': {
|
case 'ArrowDown': {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
this.updateModelValue(this.modelValue - 1);
|
this.updateModelValue(this.modelValue - 1);
|
||||||
|
|
|
@ -241,7 +241,7 @@ data() {
|
||||||
<td>
|
<td>
|
||||||
<span class="inline-flex flex-column">
|
<span class="inline-flex flex-column">
|
||||||
<i class="mb-1">left arrow</i>
|
<i class="mb-1">left arrow</i>
|
||||||
<i>up arrow</i>
|
<i>down arrow</i>
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
<td>Decrements the value.</td>
|
<td>Decrements the value.</td>
|
||||||
|
@ -250,7 +250,7 @@ data() {
|
||||||
<td>
|
<td>
|
||||||
<span class="inline-flex flex-column">
|
<span class="inline-flex flex-column">
|
||||||
<i class="mb-1">right arrow</i>
|
<i class="mb-1">right arrow</i>
|
||||||
<i>down arrow</i>
|
<i>up arrow</i>
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
<td>Increments the value.</td>
|
<td>Increments the value.</td>
|
||||||
|
|
Loading…
Reference in New Issue