Skip to content

Commit

Permalink
fix(demo): correct templateRef option in icon dropdown for inputCardG…
Browse files Browse the repository at this point in the history
…roup api (#9054)
  • Loading branch information
waterplea authored and shiv9604 committed Sep 21, 2024
1 parent d4099d2 commit 3581729
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,12 @@ export default class PageComponent extends AbstractExampleTuiInteractive {
'Custom labels',
];

protected readonly cards: Record<string, string> = {
protected readonly cards: Record<string, PolymorpheusContent | string> = {
common: 'https://ng-web-apis.github.io/dist/assets/images/common.svg',
universal: 'https://ng-web-apis.github.io/dist/assets/images/universal.svg',
mutation:
'https://ng-web-apis.github.io/dist/assets/images/mutation-observer.svg',
TemplateRef: '',
};

protected iconVariants: readonly string[] = Object.keys(this.cards);
Expand Down Expand Up @@ -80,6 +81,8 @@ export default class PageComponent extends AbstractExampleTuiInteractive {
protected getContentVariants(
template: PolymorpheusContent,
): readonly PolymorpheusContent[] | null {
return [...this.iconVariants, template];
this.cards['TemplateRef'] = template;

return [...this.iconVariants];
}
}

0 comments on commit 3581729

Please sign in to comment.