Skip to content

Commit 5cc3db3

Browse files
authored
Merge pull request #3114 from Akshat55/contained-list-action-context
fix: add input for action context
2 parents eafcf3f + 2d9d48e commit 5cc3db3

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/contained-list/contained-list.component.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import {
22
ChangeDetectionStrategy,
33
Component,
4-
HostBinding,
54
Input,
65
TemplateRef
76
} from "@angular/core";
@@ -41,7 +40,7 @@ import { ContainedListKind, ContainedListSize } from "./contained-list.enums";
4140
</div>
4241
4342
<div class="cds--contained-list__action" *ngIf="action">
44-
<ng-template [ngTemplateOutlet]="action"></ng-template>
43+
<ng-template [ngTemplateOutlet]="action" [ngTemplateOutletContext]="{ $implicit: actionData }"></ng-template>
4544
</div>
4645
</div>
4746
<div role="list" [attr.aria-labelledby]="labelId">
@@ -60,6 +59,11 @@ export class ContainedList {
6059
*/
6160
@Input() action: TemplateRef<any>;
6261

62+
/**
63+
* Optional interactive element data.
64+
*/
65+
@Input() actionData: any;
66+
6367
/**
6468
* Specify whether the dividing lines in between list items should be inset.
6569
*/

0 commit comments

Comments
 (0)