/
githubmirror
/
components
Обзор
Документация
Войти
/
githubmirror
/
components
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/components-examples/material/tree/tree-dynamic/tree-dynamic-example.html
18 строк
832 B
Kristiyan Kostadinov
docs(material/tree): dynamic example not updating (#33365)
08 июн 2026, 10:56
Не верифицирован
08 июн 2026, 10:56
0262a4f
Код
Авторство
О чём код?
<mat-tree #tree [dataSource]="dataSource()" [childrenAccessor]="childrenAccessor"> <mat-tree-node *matTreeNodeDef="let node" matTreeNodePadding> <button matIconButton disabled></button> {{node.name}} </mat-tree-node> <mat-tree-node *matTreeNodeDef="let node; when: hasChild" matTreeNodePadding matTreeNodeToggle [cdkTreeNodeTypeaheadLabel]="node.name" (expandedChange)="onNodeExpanded(node, $event)"> <button matIconButton [attr.aria-label]="'Toggle ' + node.name" matTreeNodeToggle> <mat-icon class="mat-icon-rtl-mirror"> {{tree.isExpanded(node) ? 'expand_more' : 'chevron_right'}} </mat-icon> </button> {{node.name}} @if (node.isLoading()) { <mat-progress-bar mode="indeterminate" class="example-tree-progress-bar"></mat-progress-bar> } </mat-tree-node> </mat-tree>