[WEB-4814] chore: enabled reordering in list when group is none #7684

This commit is contained in:
Vamsi Krishna 2025-09-01 19:46:17 +05:30 committed by GitHub
parent f2edf637de
commit e679dc3d12
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View file

@ -240,7 +240,7 @@ export const ListGroup = observer((props: Props) => {
isWorkflowDropDisabled, isWorkflowDropDisabled,
]); ]);
const isDragAllowed = !!group_by && DRAG_ALLOWED_GROUPS.includes(group_by); const isDragAllowed = group_by ? DRAG_ALLOWED_GROUPS.includes(group_by) : true;
const canOverlayBeVisible = isWorkflowDropDisabled || orderBy !== "sort_order" || !!group.isDropDisabled; const canOverlayBeVisible = isWorkflowDropDisabled || orderBy !== "sort_order" || !!group.isDropDisabled;
const isDropDisabled = isWorkflowDropDisabled || !!group.isDropDisabled; const isDropDisabled = isWorkflowDropDisabled || !!group.isDropDisabled;

View file

@ -521,7 +521,7 @@ export const handleGroupDragDrop = async (
subGroupBy: TIssueGroupByOptions | undefined, subGroupBy: TIssueGroupByOptions | undefined,
shouldAddIssueAtTop = false shouldAddIssueAtTop = false
) => { ) => {
if (!source.id || !groupBy || (subGroupBy && (!source.subGroupId || !destination.subGroupId))) return; if (!source.id || (subGroupBy && (!source.subGroupId || !destination.subGroupId))) return;
let updatedIssue: Partial<TIssue> = {}; let updatedIssue: Partial<TIssue> = {};
const issueUpdates: IssueUpdates = {}; const issueUpdates: IssueUpdates = {};
@ -549,7 +549,7 @@ export const handleGroupDragDrop = async (
}; };
// update updatedIssue values based on the source and destination groupIds // update updatedIssue values based on the source and destination groupIds
if (source.groupId && destination.groupId && source.groupId !== destination.groupId) { if (source.groupId && destination.groupId && source.groupId !== destination.groupId && groupBy) {
const groupKey = ISSUE_FILTER_DEFAULT_DATA[groupBy]; const groupKey = ISSUE_FILTER_DEFAULT_DATA[groupBy];
let groupValue: any = clone(sourceIssue[groupKey]); let groupValue: any = clone(sourceIssue[groupKey]);