I want to hide a bulk action in <c8y-data-grid>

I want to hide a bulk action in a Data Grid <c8y-data-grid> with the following code in my component:

    this.bulkActionControls = [
      {
        type: BuiltInActionType.Delete,
        callback: this.deleteMappingBulkWithConfirmation.bind(this),
        showIf: (selectedItemIds) => {
			const result = true;
			// depending on selected ids hide the bulkDelete
            console.log('Selected mappings (showIf):', selectedItemIds);
            return result;
        }
]

I only see the console output once as:
Selected mappings (showIf): undefined.
It is not printed every time I select a row (mapping)

I would expect, that every time I select/deselect a row I see the console output:
Selected mappings (showIf): ['5001', '5002','5003'].

Version:
@c8y/ngx-components”: “1020.26.2”

I tested the same with a simpler sample in the tutorial app and it didn’t work either.

Regards Christof

Hi Christof,

Passing IDs of selected row items to the showIf function of bulk action controls is not yet released in the version you mentioned. It will soon get released in one of the next 1020.x.x versions.

Cheers,
Bozhidar

The estimated release version of this improvement is 1020.31.0.