예제 #1
0
    public async Task SortBy(IDataSortKey <TDataItem>?sk)
    {
        if (SelectedSortKey == sk)
        {
            return;
        }

        SelectedSortKey       = sk;
        SelectedSortDirection = sk == null ? SortDir.None : SortDir.Ascending;
        await ResetTable();
    }
예제 #2
0
 public async Task ToggleDirection()
 {
     if (SelectedSortKey == null)
     {
         SelectedSortDirection = SortDir.None;
     }
     else if (SelectedSortDirection == SortDir.Ascending)
     {
         SelectedSortDirection = SortDir.Descending;
     }
     else
     {
         SelectedSortDirection = SortDir.Ascending;
     }
     await ResetTable();
 }