mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-22 01:25:38 -05:00
Agent: Filtering & Sorting (#1441)
* have a working filter * fixed error details when filtering * filtering with styling done * fix transition styling * fixed more styling issues * optimized errors when switching pages * added sorting functionality * removed dead code * fixed styling issues when sorting * added sorting with styling for every column * code review comments * fixed styling issue when a bigger filter was applied, followed by a smaller one and then cleared * use absolute paths in imports * fixed issues with styling when sorting is performed on a filtered dataset
This commit is contained in:
@@ -14,7 +14,7 @@ export interface IFindPosition {
|
||||
row: number;
|
||||
}
|
||||
|
||||
function defaultSort<T>(args: Slick.OnSortEventArgs<T>, data: Array<T>): Array<T> {
|
||||
export function defaultSort<T>(args: Slick.OnSortEventArgs<T>, data: Array<T>): Array<T> {
|
||||
let field = args.sortCol.field;
|
||||
let sign = args.sortAsc ? 1 : -1;
|
||||
return data.sort((a, b) => (a[field] === b[field] ? 0 : (a[field] > b[field] ? 1 : -1)) * sign);
|
||||
|
||||
Reference in New Issue
Block a user