Skip to content

Commit

Permalink
fix(demo): resolve pr comments (#9054)
Browse files Browse the repository at this point in the history
  • Loading branch information
shiv9604 committed Oct 3, 2024
1 parent a56e8a5 commit 9fdd72f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type {PipeTransform} from '@angular/core';
import {inject, Pipe} from '@angular/core';
import {inject, Pipe, TemplateRef} from '@angular/core';
import {tuiInspectAny} from '@taiga-ui/addon-doc/utils';
import {TUI_IS_E2E} from '@taiga-ui/cdk/tokens';

Expand All @@ -22,6 +22,6 @@ export class TuiInspectPipe implements PipeTransform {
return 'λ(x) => y';
}

return tuiInspectAny(value, depth);
return value instanceof TemplateRef ? 'TemplateRef' : tuiInspectAny(value, depth);
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Component, TemplateRef} from '@angular/core';
import {Component} from '@angular/core';
import {FormControl, ReactiveFormsModule} from '@angular/forms';
import {changeDetection} from '@demo/emulate/change-detection';
import {TuiDemo} from '@demo/utils';
Expand Down Expand Up @@ -80,11 +80,6 @@ export default class PageComponent extends AbstractExampleTuiInteractive {
protected getContentVariants(
template: PolymorpheusContent,
): readonly PolymorpheusContent[] | null {
if (template instanceof TemplateRef) {
this.cards['TemplateRef'] = template;
this.iconVariants = Object.keys(this.cards);
}

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

0 comments on commit 9fdd72f

Please sign in to comment.