core/list-group/list-item-action.component.ts
Actions are functions that can be executed on the current list item. They are displayed next to the item and can be grouped in a dropdown.
Example :<c8y-li>
<c8y-li-action (click)="deleteDevice(device.id)" icon="times">
Delete
</c8y-li-action>
<c8y-li-action (click)="(false)" icon="rocket">
Launch to space
</c8y-li-action>
</c8y-li>
| providers |
)
|
| selector | c8y-list-item-action, c8y-li-action |
| standalone | true |
| imports |
NgIf
C8yTranslatePipe
|
| templateUrl | ./list-item-action.component.html |
NgIf
IconDirective
C8yTranslatePipe
)
ProductExperienceEventSource
<ng-template #template>
<li>
<button
title="{{ label | translate }}"
(click)="click.emit($event)"
data-cy="c8y-li-action--btn"
[disabled]="disabled"
>
<i
[c8yIcon]="icon"
*ngIf="icon"
></i>
<span *ngIf="label">{{ label | translate }}</span>
<ng-content></ng-content>
</button>
</li>
</ng-template>