protected Task SortHeader(DynamicTableHeader header) { if (header.CanSort) { Sort(header); } return(Task.CompletedTask); }
protected void Sort(DynamicTableHeader header) { if (CurrentOrdered != null && CurrentOrdered != header) { SortedTable.Remove(CurrentOrdered); } CurrentOrdered = header; if (!SortedTable.ContainsKey(CurrentOrdered)) { SortedTable[CurrentOrdered] = true; } var isAsc = SortedTable[CurrentOrdered]; SortRequest?.Invoke(header.SortId, isAsc); SortedTable[CurrentOrdered] = !SortedTable[CurrentOrdered]; }