mirror of
https://gitee.com/ant-design-blazor/ant-design-blazor.git
synced 2024-12-02 20:17:58 +08:00
fix(module: table): rows which have been remove from selectedRows would be selected again (#3762)
* fix(module: table): rows which have been remove from selectedRows would be selected again. * fix expand * fix group selection
This commit is contained in:
parent
1d946b030d
commit
b3f070c429
@ -31,6 +31,8 @@ namespace AntDesign
|
||||
|
||||
public void ExpandAll()
|
||||
{
|
||||
_preventRender = true;
|
||||
|
||||
foreach (var item in _rootRowDataCache)
|
||||
{
|
||||
item.Value.SetExpanded(true);
|
||||
@ -39,6 +41,8 @@ namespace AntDesign
|
||||
|
||||
public void CollapseAll()
|
||||
{
|
||||
_preventRender = true;
|
||||
|
||||
foreach (var item in _rootRowDataCache)
|
||||
{
|
||||
item.Value.SetExpanded(false);
|
||||
|
@ -446,8 +446,6 @@ namespace AntDesign
|
||||
return;
|
||||
}
|
||||
|
||||
FlushCache();
|
||||
|
||||
var queryModel = this.InternalReload();
|
||||
StateHasChanged();
|
||||
if (OnChange.HasDelegate)
|
||||
@ -475,9 +473,10 @@ namespace AntDesign
|
||||
var queryModel = BuildQueryModel();
|
||||
_currentQueryModel = queryModel;
|
||||
|
||||
FlushCache();
|
||||
|
||||
if (ServerSide)
|
||||
{
|
||||
FlushCache();
|
||||
_showItems = _dataSource ?? Enumerable.Empty<TItem>();
|
||||
_total = Total;
|
||||
}
|
||||
@ -838,6 +837,9 @@ namespace AntDesign
|
||||
if (RowKey == null)
|
||||
RowKey = data => data;
|
||||
|
||||
if (x is null && y is null)
|
||||
return true;
|
||||
|
||||
return RowKey(x).Equals(RowKey(y));
|
||||
}
|
||||
|
||||
|
@ -84,7 +84,11 @@ namespace AntDesign.TableModels
|
||||
|
||||
internal void SetExpanded(bool expanded)
|
||||
{
|
||||
_expanded = expanded;
|
||||
if (_expanded != expanded)
|
||||
{
|
||||
_expanded = expanded;
|
||||
ExpandedChanged?.Invoke(this, _expanded);
|
||||
}
|
||||
}
|
||||
|
||||
protected abstract void CheckedChildren(bool isSelected, bool checkStrictly);
|
||||
|
Loading…
Reference in New Issue
Block a user