Skip to content

Commit fb72278

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

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/SortableContainer/index.js

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

10071007
keyMove = (shift) => {
1008+
const {transitionDuration} = this.props;
1009+
1010+
if (this.keyMoving) {
1011+
return;
1012+
} else {
1013+
this.keyMoveInterval = setTimeout(() => {
1014+
this.keyMoving = false;
1015+
}, transitionDuration);
1016+
this.keyMoving = true;
1017+
}
1018+
10081019
const {
10091020
activeKeyLift: {index, collection},
10101021
} = this.manager;

0 commit comments

Comments
 (0)