prevent cards in kanban board from being dragged infintely to the right by limiting x delta (#853)
Previously, if a card in the Kanban board was dragged to the far right edge of the screen, it would continue scrolling. With this change, we introduce a variant of the restrictToFirstScrollableAncestor dnd-kit modifier (https://docs.dndkit.com/api-documentation/modifiers#restricttofirstscrollableancestor). This modifier additionally limits the x delta of the dragged card by comparing the right edge of the card to the right edge of the scrollable ancestor and ensuring that it is at least 16 units.
This commit is contained in:
committed by
GitHub
parent
d35338d450
commit
5b0be87d3f
@@ -35,7 +35,8 @@
|
||||
"pnpm": ">=8"
|
||||
},
|
||||
"dependencies": {
|
||||
"@ebay/nice-modal-react": "^1.2.13",
|
||||
"lodash": "^4.17.21"
|
||||
"lodash": "^4.17.21",
|
||||
"@dnd-kit/utilities": "^3.2.2",
|
||||
"@ebay/nice-modal-react": "^1.2.13"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user