From 134b91d0b590609f63a8db4807615ffb24a3fcf2 Mon Sep 17 00:00:00 2001 From: Aleksander Sklorz Date: Wed, 29 Nov 2023 14:42:15 +0100 Subject: [PATCH] ACS-6323 Allow to dragging column over only enabled columns --- .../lib/datatable/components/datatable/datatable.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/core/src/lib/datatable/components/datatable/datatable.component.ts b/lib/core/src/lib/datatable/components/datatable/datatable.component.ts index e15a101ee77..391a60a9dc3 100644 --- a/lib/core/src/lib/datatable/components/datatable/datatable.component.ts +++ b/lib/core/src/lib/datatable/components/datatable/datatable.component.ts @@ -976,7 +976,7 @@ export class DataTableComponent implements OnInit, AfterContentInit, OnChanges, } sortPredicate(index: number, _drag: CdkDrag, drop: CdkDropList): boolean { - return index > 0 && index < drop.getSortedItems().length; + return !drop.getSortedItems()[index].disabled; } private updateColumnsWidths(): void {