public async Task SortBy(IDataSortKey <TDataItem>?sk) { if (SelectedSortKey == sk) { return; } SelectedSortKey = sk; SelectedSortDirection = sk == null ? SortDir.None : SortDir.Ascending; await ResetTable(); }
public async Task ToggleDirection() { if (SelectedSortKey == null) { SelectedSortDirection = SortDir.None; } else if (SelectedSortDirection == SortDir.Ascending) { SelectedSortDirection = SortDir.Descending; } else { SelectedSortDirection = SortDir.Ascending; } await ResetTable(); }