Skip to content

Commit

Permalink
fix(dnd): allow drag n drop only if using the handler
Browse files Browse the repository at this point in the history
  • Loading branch information
Clm-Roig committed Oct 19, 2022
1 parent cd65652 commit 681dae4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions cypress/e2e/manage-trackers/actions.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ context('Manage trackers', () => {
cy.get('#notistack-snackbar').should('contain.text', 'Tracker archivé');
cy.get('[data-testid="CloseIcon"]').click();
cy.get('.MuiListSubheader-root').contains('ARCHIVÉS');
cy.wait(800); // Wait for the animation to end
});

it('deletes one tracker', () => {
Expand Down
4 changes: 3 additions & 1 deletion src/components/TrackerCard/TrackerCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ const TrackerCard: FC<Props> = ({ tracker, ...cardProps }) => {
exit="exit"
style={{ boxShadow, y }}
variants={cardAnimations}
transition={{ duration: 0.6 }}>
dragListener={false}
dragControls={dragControls}
transition={{ duration: 0.4 }}>
<Card
style={{ background: tracker.color }}
{...cardProps}
Expand Down

0 comments on commit 681dae4

Please sign in to comment.