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