Skip to content

Commit 6a82526

Browse files
author
Brian Ryu
committed
Throttle keyboard sort
1 parent 33865fc commit 6a82526

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/SortableContainer/index.js

+10
Original file line numberDiff line numberDiff line change
@@ -1005,6 +1005,16 @@ export default function sortableContainer(
10051005
};
10061006

10071007
keyMove = (shift) => {
1008+
const {transitionDuration} = this.props;
1009+
1010+
if (this.keyMoveInterval) {
1011+
return;
1012+
} else {
1013+
this.keyMoveInterval = setTimeout(() => {
1014+
clearTimeout(this.keyMoveInterval);
1015+
}, transitionDuration);
1016+
}
1017+
10081018
const {
10091019
activeKeyLift: {index, collection},
10101020
} = this.manager;

0 commit comments

Comments
 (0)