fix(Collapse): collapsed status incorrect (#3569)

* fix: add key on Collapse item

* chore: bump version 8.5.9
This commit is contained in:
Argo Zhang 2024-05-25 03:18:44 +08:00 committed by GitHub
parent 6ec3da13f5
commit 3efcdf6e55
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">
<PropertyGroup>
<Version>8.5.9-beta05</Version>
<Version>8.5.9</Version>
</PropertyGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net5.0'">

View File

@ -8,7 +8,7 @@
<RenderTemplate>
@foreach (var item in Children)
{
<div class="@GetItemClassString(item)">
<div @key="item" class="@GetItemClassString(item)">
<div class="accordion-header">
<Button class="@GetButtonClassString(item)" data-bs-toggle="collapse" data-bs-target="@GetTargetIdString(item)" aria-expanded="@(item.IsCollapsed ? "false" : "true")" Color="item.TitleColor" Text="@item.Text" OnClickWithoutRender="@(() => OnClickItem(item))" Icon="@item.Icon" />
</div>