Skip to content

Commit

Permalink
chore(demo): add auto-generated hint for examples with `<tui-data-lis…
Browse files Browse the repository at this point in the history
…t-wrapper />` (#2738)
  • Loading branch information
nsbarsukov authored Sep 20, 2022
1 parent 07d9aee commit 5edfedb
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ export class TuiAutoGeneratedCodeHintsComponent {
return (
this.includesHintController(code) ||
this.includesTextfieldController(code) ||
this.includesDropdownController(code)
this.includesDropdownController(code) ||
this.includesDataListWrapper(code)
);
}

Expand All @@ -57,4 +58,9 @@ export class TuiAutoGeneratedCodeHintsComponent {
includesDropdownController(code: string): boolean {
return DROPDOWN_CONTROLLER_SELECTORS.some(selector => code.includes(selector));
}

@tuiPure
includesDataListWrapper(code: string): boolean {
return code.includes(`<tui-data-list-wrapper`);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,14 @@
</a>
to configure dropdown options.
</li>

<li
*ngIf="includesDataListWrapper(code)"
class="tui-list__item"
>
This example requires import of
<code>TuiDataListWrapperModule</code>
.
</li>
</ul>
</ng-template>

0 comments on commit 5edfedb

Please sign in to comment.