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" checked="@Checked"
disabled="@IsDisabled" disabled="@IsDisabled"
autofocus=@AutoFocus autofocus=@AutoFocus
@onchange="@InputCheckedChange" @onchange="@InputCheckedChange"
type="checkbox" type="checkbox"
class="ant-checkbox-input" /> class="ant-checkbox-input" />
<span class="ant-checkbox-inner"></span> <span class="ant-checkbox-inner"></span>
</span> </span>
<span>
@if (ChildContent != null) @if (ChildContent != null)
{ {
<span>
@ChildContent @ChildContent
} </span>
else }
{ else
@Label {
} <span>@Label</span>
</span> }
</label> </label>

View File

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