Skip to content

Draggable horizontal list #4506

Answered by LFDanLu
ritz078 asked this question in Q&A
May 10, 2023 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

Unfortunately, useDroppableCollection doesn't support ArrowLeft/Right at the moment, only ArrowUp/Down are covered here:

onKeyDown(e, drag) {
let {keyboardDelegate} = localState.props;
let types = getTypes(drag.items);
switch (e.key) {
case 'ArrowDown': {
if (keyboardDelegate.getKeyBelow) {
let target = nextValidTarget(localState.state.target, types, drag.allowedDropOperations, getNextTarget);
localState.state.setTarget(target);
}
break;
}
case 'ArrowUp': {
if (keyboardDelegate.getKeyAbove) {
let target = nextValidTa…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@ritz078
Comment options

@devongovett
Comment options

Answer selected by ritz078
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants