ant-design-blazor/components/tree/Tree.razor
琢磨先生 300123045f refactor(module: tree): add draggable, fix default value binding (#1517)
* delete demo docs

* fix tree default value and dnd

* fix tree line and keys

* fix switcher icon and line

* fix line demo

* fix switcher

* add DirectoryTree demo

* fix draggable demo

* clean code

* clean code

* clean up the classmapper call

* update docs

* fix the docs

* fix comment

Co-authored-by: James Yeung <shunjiey@hotmail.com>
2021-07-11 18:43:25 +08:00

23 lines
691 B
C#

@namespace AntDesign
@inherits AntDomComponentBase
@typeparam TItem
<div class="@ClassMapper.Class" style="@Style" @ref="Ref">
<div class="ant-tree-list">
<div class="ant-tree-list-holder-inner">
<CascadingValue Value="this" Name="Tree" IsFixed="@true">
@if (DataSource != null)
{
foreach (var item in DataSource)
{
<TreeNode DataItem="@item" @key="item.GetHashCode()"></TreeNode>
}
}
else
{
@Nodes
}
</CascadingValue>
</div>
</div>
</div>