mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix(site): restrict pinned chats drag to vertical-only (#26050)
This commit is contained in:
@@ -519,6 +519,13 @@ export const ChatsPanel: FC<ChatsPanelProps> = ({
|
|||||||
<DndContext
|
<DndContext
|
||||||
sensors={sensors}
|
sensors={sensors}
|
||||||
collisionDetection={closestCenter}
|
collisionDetection={closestCenter}
|
||||||
|
modifiers={[
|
||||||
|
// Restrict the drag to the y-axis only
|
||||||
|
({ transform }) => ({
|
||||||
|
...transform,
|
||||||
|
x: 0,
|
||||||
|
}),
|
||||||
|
]}
|
||||||
onDragEnd={handleDragEnd}
|
onDragEnd={handleDragEnd}
|
||||||
>
|
>
|
||||||
<SortableContext
|
<SortableContext
|
||||||
|
|||||||
Reference in New Issue
Block a user