mirror of
https://gitee.com/ant-design-blazor/ant-design-blazor.git
synced 2024-12-15 01:11:52 +08:00
28 lines
658 B
C#
28 lines
658 B
C#
|
using AntDesign.TableModels;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.Linq;
|
|||
|
|
|||
|
namespace AntDesign
|
|||
|
{
|
|||
|
public partial class Table<TItem> : ITable
|
|||
|
{
|
|||
|
private IDictionary<int, RowData<TItem>> _dataSourceCache;
|
|||
|
|
|||
|
private void FlushCache()
|
|||
|
{
|
|||
|
_dataSourceCache ??= new Dictionary<int, RowData<TItem>>();
|
|||
|
_dataSourceCache.Clear();
|
|||
|
}
|
|||
|
|
|||
|
int[] ITable.GetSelectedIndex()
|
|||
|
{
|
|||
|
return _dataSourceCache.Where(x => x.Value.Selected).Select(x => x.Key).ToArray();
|
|||
|
}
|
|||
|
|
|||
|
private void FinishLoadPage()
|
|||
|
{
|
|||
|
_selection?.ChangeOnPaging();
|
|||
|
}
|
|||
|
}
|
|||
|
}
|