Skip to content

Commit 73650d3

Browse files
committed
Allow collapsing by keyboard
1 parent 3fe275a commit 73650d3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/SplitPanel.vue

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,10 @@ const handleKeydown = (event: KeyboardEvent) => {
214214
newPosition = props.primary === 'end' ? 0 : 100;
215215
}
216216
217+
if (event.key === 'Enter' && props.collapsible) {
218+
collapsed.value = !collapsed.value;
219+
}
220+
217221
sizePercentage.value = clamp(newPosition, 0, 100);
218222
}
219223
};

0 commit comments

Comments
 (0)