lint fixes

pull/41/head
mertsincan 2019-08-08 13:24:43 +03:00
parent dab6f44292
commit a084cfa689
1 changed files with 12 additions and 8 deletions

View File

@ -92,39 +92,43 @@ export default {
switch (event.which) { switch (event.which) {
//down arrow //down arrow
case 40: case 40: {
const nextRow = rowElement.nextElementSibling; const nextRow = rowElement.nextElementSibling;
if (nextRow) { if (nextRow) {
nextRow.focus(); nextRow.focus();
} }
event.preventDefault(); event.preventDefault();
break; break;
}
//up arrow //up arrow
case 38: case 38: {
const previousRow = rowElement.previousElementSibling; const previousRow = rowElement.previousElementSibling;
if (previousRow) { if (previousRow) {
previousRow.focus(); previousRow.focus();
} }
event.preventDefault(); event.preventDefault();
break; break;
}
//right-left arrows //right-left arrows
case 37: case 37:
case 39: case 39: {
if (!this.leaf) { if (!this.leaf) {
this.$emit('node-toggle', this.node); this.$emit('node-toggle', this.node);
event.preventDefault(); event.preventDefault();
} }
break; break;
}
//enter //enter
case 13: case 13: {
this.onClick(event); this.onClick(event);
event.preventDefault(); event.preventDefault();
break; break;
}
default: default:
//no op //no op