fix(module: table): avoid selection disabled at the time that there are no rows (#3436)

This commit is contained in:
James Yeung 2023-09-21 07:33:54 +08:00 committed by GitHub
parent 766045ce64
commit f301bea650
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 11 deletions

View File

@ -8,20 +8,22 @@
checked="@Checked"
disabled="@IsDisabled"
autofocus=@AutoFocus
@onchange="@InputCheckedChange"
@onchange="@InputCheckedChange"
type="checkbox"
class="ant-checkbox-input" />
<span class="ant-checkbox-inner"></span>
</span>
<span>
@if (ChildContent != null)
{
@if (ChildContent != null)
{
<span>
@ChildContent
}
else
{
@Label
}
</span>
</span>
}
else
{
<span>@Label</span>
}
</label>

View File

@ -29,7 +29,7 @@ namespace AntDesign
//private int[] _selectedIndexes;
private bool IsHeaderDisabled => RowSelections.All(x => x.Disabled);
private bool IsHeaderDisabled => RowSelections.Any() && RowSelections.All(x => x.Disabled);
private bool? _selected;