[ACS-12728] Allowed to decide if drag preview should be whole row or not

This commit is contained in:
Aleksander Sklorz
2026-09-09 14:42:50 +02:00
parent f82f86d99a
commit 090de510f2
4 changed files with 73 additions and 64 deletions
@@ -33,7 +33,8 @@
[enableDragRows]="enableDragRows"
[dropListConnectedTo]="dropListConnectedTo"
[dragBoundary]="dragBoundary"
[showDragIndicator]="showDragIndicator">
[showDragIndicator]="showDragIndicator"
[useWholeRowAsDragPreview]="useWholeRowAsDragPreview">
<div *ngIf="headerFilters">
<adf-filter-header
@@ -399,6 +399,9 @@ export class DocumentListComponent extends DataTableSchema implements OnInit, On
@Input()
showDragIndicator = true;
@Input()
useWholeRowAsDragPreview = true;
/**
* Indicates if the data is provided externally.
* If true the component won't fetch data itself
@@ -596,6 +596,7 @@
</div>
}
@if (!useWholeRowAsDragPreview) {
<div *cdkDragPreview class="adf-datatable-row__dragging-preview">
@for (col of getVisibleColumns(); track col.key) {
@if (col.visibleInDragPreview) {
@@ -665,6 +666,7 @@
}
}
</div>
}
</adf-datatable-row>
@if (isEmpty()) {
<div role="row" class="adf-datatable-row">
@@ -239,6 +239,9 @@ export class DataTableComponent implements OnInit, AfterContentInit, OnChanges,
@Input()
showDragIndicator = true;
@Input()
useWholeRowAsDragPreview = true;
/** Emitted when the user clicks a row. */
@Output()
rowClick = new EventEmitter<DataRowEvent>();