Improve scroll handling in project priorities list (v2.8.3)
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 22s
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 22s
This commit is contained in:
@@ -272,7 +272,7 @@ function SortableProjectItem({ project, index, allProjects, onMenuClick }) {
|
||||
<div
|
||||
ref={setNodeRef}
|
||||
data-id={project.name}
|
||||
style={{ ...style, touchAction: 'none' }}
|
||||
style={style}
|
||||
className={`bg-white rounded-lg p-3 border-2 border-gray-200 shadow-sm hover:shadow-md transition-all duration-200 ${
|
||||
isDragging ? 'border-indigo-400' : ''
|
||||
}`}
|
||||
@@ -407,7 +407,7 @@ function ProjectPriorityManager({ allProjectsData, currentWeekData, shouldLoad,
|
||||
const sensors = useSensors(
|
||||
useSensor(PointerSensor, {
|
||||
activationConstraint: {
|
||||
distance: 10, // Активация только после перемещения на 10px
|
||||
distance: 15, // Увеличиваем расстояние для активации, чтобы дать больше времени для скролла
|
||||
},
|
||||
}),
|
||||
useSensor(KeyboardSensor, {
|
||||
@@ -906,7 +906,10 @@ function ProjectPriorityManager({ allProjectsData, currentWeekData, shouldLoad,
|
||||
onDragEnd={handleDragEnd}
|
||||
onDragCancel={handleDragCancel}
|
||||
>
|
||||
<div className="space-y-6 overflow-y-auto flex-1" style={{ minHeight: 0 }}>
|
||||
<div
|
||||
className="space-y-6 overflow-y-auto flex-1"
|
||||
style={{ minHeight: 0, touchAction: 'pan-y' }}
|
||||
>
|
||||
<SortableContext items={maxPriority.map(p => p.name)} strategy={verticalListSortingStrategy}>
|
||||
<PrioritySlot
|
||||
title="Максимальный приоритет (1 проект)"
|
||||
|
||||
Reference in New Issue
Block a user