diff --git a/lib/core/src/lib/datatable/components/datatable/datatable.component.scss b/lib/core/src/lib/datatable/components/datatable/datatable.component.scss
index 145937c4ee..ba5ae0d233 100644
--- a/lib/core/src/lib/datatable/components/datatable/datatable.component.scss
+++ b/lib/core/src/lib/datatable/components/datatable/datatable.component.scss
@@ -324,6 +324,12 @@ $data-table-cell-min-width-file-size: $data-table-cell-min-width-1 !default;
margin-left: auto;
justify-content: end;
padding-right: 15px;
+
+ &-provided {
+ max-width: 100px !important;
+ justify-content: center;
+ padding-right: 0;
+ }
}
.adf-datatable-checkbox {
diff --git a/lib/core/src/lib/datatable/components/datatable/datatable.component.spec.ts b/lib/core/src/lib/datatable/components/datatable/datatable.component.spec.ts
index 1f60f6c6dc..7d9c152cb5 100644
--- a/lib/core/src/lib/datatable/components/datatable/datatable.component.spec.ts
+++ b/lib/core/src/lib/datatable/components/datatable/datatable.component.spec.ts
@@ -2188,4 +2188,95 @@ describe('Column Resizing', () => {
dataTable.onDragDrop(data as CdkDragDrop
);
expect(dataTable.dragDropped.emit).toHaveBeenCalledWith(data);
});
+
+ describe('show correct column count', () => {
+ it('should display 2 columns for no provided actions and no default actions', () => {
+ dataTable.data = new ObjectDataTableAdapter(
+ [{ name: '1' }],
+ [new ObjectDataColumn({ key: 'name', title: 'Name', sortable: true }), new ObjectDataColumn({ key: 'other', title: 'Other', sortable: true })]
+ );
+
+ fixture.detectChanges();
+
+ const visibleColumns = dataTable.getVisibleColumns();
+
+ const datatableCellHeaders = fixture.debugElement.queryAll(By.css('.adf-datatable-cell-header'));
+ const datatableCells = fixture.debugElement.queryAll(By.css('.adf-datatable-cell'));
+
+ expect(visibleColumns.length).toBe(2);
+
+ const expectedNumberOfColumns = 2;
+
+ expect(datatableCellHeaders.length).toBe(expectedNumberOfColumns);
+ expect(datatableCells.length).toBe(expectedNumberOfColumns);
+ });
+
+ it('should display 2 columns if last column has no title and there are no provided actions and no default actions', () => {
+ dataTable.data = new ObjectDataTableAdapter(
+ [{ name: '1' }],
+ [new ObjectDataColumn({ key: 'name', title: 'Name', sortable: true }), new ObjectDataColumn({ key: 'other', sortable: true })]
+ );
+
+ fixture.detectChanges();
+
+ const visibleColumns = dataTable.getVisibleColumns();
+
+ const datatableCellHeaders = fixture.debugElement.queryAll(By.css('.adf-datatable-cell-header'));
+ const datatableCells = fixture.debugElement.queryAll(By.css('.adf-datatable-cell'));
+
+ expect(visibleColumns.length).toBe(2);
+
+ const expectedNumberOfColumns = 2;
+
+ expect(datatableCellHeaders.length).toBe(expectedNumberOfColumns);
+ expect(datatableCells.length).toBe(expectedNumberOfColumns);
+ });
+
+ it('should display 3 columns if there are default actions', () => {
+ dataTable.data = new ObjectDataTableAdapter(
+ [{ name: '1' }],
+ [new ObjectDataColumn({ key: 'name', title: 'Name', sortable: true }), new ObjectDataColumn({ key: 'other', title: 'Other', sortable: true })]
+ );
+
+ dataTable.actions = true;
+
+ fixture.detectChanges();
+
+ const visibleColumns = dataTable.getVisibleColumns();
+
+ const datatableCellHeaders = fixture.debugElement.queryAll(By.css('.adf-datatable-cell-header'));
+ const datatableCells = fixture.debugElement.queryAll(By.css('.adf-datatable-cell'));
+
+ expect(visibleColumns.length).toBe(2);
+
+ const expectedNumberOfColumns = 3;
+
+ expect(datatableCellHeaders.length).toBe(expectedNumberOfColumns);
+ expect(datatableCells.length).toBe(expectedNumberOfColumns);
+ });
+
+ it('should display 2 columns if there are default actions and provided actions', () => {
+ dataTable.data = new ObjectDataTableAdapter(
+ [{ name: '1' }],
+ [new ObjectDataColumn({ key: 'name', title: 'Name', sortable: true }), new ObjectDataColumn({ key: 'other', sortable: true })]
+ );
+
+ dataTable.actions = true;
+ dataTable.showProvidedActions = true;
+
+ fixture.detectChanges();
+
+ const visibleColumns = dataTable.getVisibleColumns();
+
+ const datatableCellHeaders = fixture.debugElement.queryAll(By.css('.adf-datatable-cell-header'));
+ const datatableCells = fixture.debugElement.queryAll(By.css('.adf-datatable-cell'));
+
+ expect(visibleColumns.length).toBe(2);
+
+ const expectedNumberOfColumns = 2;
+
+ expect(datatableCellHeaders.length).toBe(expectedNumberOfColumns);
+ expect(datatableCells.length).toBe(expectedNumberOfColumns);
+ });
+ });
});
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 fd99a890ad..6013b79360 100644
--- a/lib/core/src/lib/datatable/components/datatable/datatable.component.ts
+++ b/lib/core/src/lib/datatable/components/datatable/datatable.component.ts
@@ -178,6 +178,10 @@ export class DataTableComponent implements OnInit, AfterContentInit, OnChanges,
@Input()
showMainDatatableActions: boolean = false;
+ /** Toggles the provided actions. */
+ @Input()
+ showProvidedActions: boolean = false;
+
/** Position of the actions dropdown menu. Can be "left" or "right". */
@Input()
actionsPosition: string = 'right'; // left|right
diff --git a/lib/process-services-cloud/src/lib/process/process-list/components/process-list-cloud.component.html b/lib/process-services-cloud/src/lib/process/process-list/components/process-list-cloud.component.html
index 4cc2ddb93b..e916022465 100644
--- a/lib/process-services-cloud/src/lib/process/process-list/components/process-list-cloud.component.html
+++ b/lib/process-services-cloud/src/lib/process/process-list/components/process-list-cloud.component.html
@@ -11,6 +11,7 @@
[actionsPosition]="actionsPosition"
[contextMenu]="showContextMenu"
[showMainDatatableActions]="showMainDatatableActions"
+ [showProvidedActions]="showProvidedActions"
[isResizingEnabled]="isResizingEnabled"
(showRowActionsMenu)="onShowRowActionsMenu($event)"
(showRowContextMenu)="onShowRowContextMenu($event)"
diff --git a/lib/process-services-cloud/src/lib/process/process-list/components/process-list-cloud.component.ts b/lib/process-services-cloud/src/lib/process/process-list/components/process-list-cloud.component.ts
index 002941cb2f..571ea6c9d9 100644
--- a/lib/process-services-cloud/src/lib/process/process-list/components/process-list-cloud.component.ts
+++ b/lib/process-services-cloud/src/lib/process/process-list/components/process-list-cloud.component.ts
@@ -192,6 +192,10 @@ export class ProcessListCloudComponent
@Input()
showActions: boolean = false;
+ /** Toggles the provided actions. */
+ @Input()
+ showProvidedActions: boolean = false;
+
/** Position of the actions dropdown menu. Can be "left" or "right". */
@Input()
actionsPosition: string = 'right'; // left|right