query results filtering and sorting (#14833)

* query results filtering and sorting (#14589)

* enable filter

* attach button style

* add hybrid data provider

* make filter and sort work

* fix editor switch issue

* configuration

* fix sort and filter

* add more specific selector

* fix hidden items issue

* update text

* revert text change

* fix copy results issue

* put feature behind preview flag

* comments

* fix tslint error
This commit is contained in:
Alan Ren
2021-03-23 11:30:41 -07:00
committed by GitHub
parent 5c67f3dbed
commit 6c54059f89
22 changed files with 554 additions and 132 deletions

View File

@@ -0,0 +1,61 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { Event } from 'vs/base/common/event';
/**
* Interface for table data providers
*/
export interface IDisposableDataProvider<T> extends Slick.DataProvider<T> {
/**
* Disposes the data provider object
*/
dispose(): void;
/**
* Gets the rows of the giving range
* @param startIndex Start index of the range
* @param length Length of the rows to retrieve
*/
getRangeAsync(startIndex: number, length: number): Promise<T[]>;
/**
* Gets unique values of all the cells in the given column
* @param column the column information
*/
getColumnValues(column: Slick.Column<T>): Promise<string[]>;
/**
* Gets the unique values of the filtered cells in the given column
* @param column
*/
getFilteredColumnValues(column: Slick.Column<T>): Promise<string[]>;
/**
* Filters the data
* @param columns columns to be filtered, the
*/
filter(columns?: Slick.Column<T>[]): Promise<void>;
/**
* Sorts the data
* @param args sort arguments
*/
sort(args: Slick.OnSortEventArgs<T>): Promise<void>;
/**
* Event fired when the filters changed
*/
readonly onFilterStateChange: Event<void>;
/**
* Event fired when the sorting is completed
*/
readonly onSortComplete: Event<Slick.OnSortEventArgs<T>>;
/**
* Gets a boolean value indicating whether the data is current in memory
*/
readonly isDataInMemory: boolean;
}