Resolve list arrow movement IO-604

This commit is contained in:
Patrick Fic
2021-02-23 11:13:14 -08:00
parent 059b328354
commit a27390e2d3
4 changed files with 27 additions and 33 deletions

View File

@@ -4,12 +4,13 @@ export default function FormListMoveArrows({ move, index, total }) {
const upDisabled = index === 0;
const downDisabled = index === total - 1;
console.log(index);
const handleUp = () => {
move(index, index - 1);
};
const handleDown = () => {
move(index, index - 1);
move(index, index + 1);
};
return (