Skip to content

Commit c177160

Browse files
committed
ondragcancel fix
1 parent f289705 commit c177160

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

ui/pages/home/index.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,10 @@ const Home: React.FC = () => {
140140
}
141141
};
142142

143+
const handleDragCancel = () => {
144+
setActiveId(null);
145+
};
146+
143147
// If no cards are registered, fall back to the original Welcome page
144148
if (registrations.length === 0) {
145149
return <Welcome />;
@@ -201,6 +205,7 @@ const Home: React.FC = () => {
201205
collisionDetection={closestCenter}
202206
onDragStart={handleDragStart}
203207
onDragEnd={handleDragEnd}
208+
onDragCancel={handleDragCancel}
204209
>
205210
<SortableContext items={idsToRender} strategy={rectSortingStrategy}>
206211
<Grid container spacing={2} alignItems="stretch">

0 commit comments

Comments
 (0)