Change tables to make them work for our scenario (#12193)

* Change tables to make them work for our scenario

* Comments & deprecate API

* Disable selections by default
This commit is contained in:
Amir Omidi
2020-09-11 13:44:19 -07:00
committed by GitHub
parent 58d3b969a2
commit 61ceb72cea
12 changed files with 253 additions and 49 deletions

View File

@@ -203,17 +203,26 @@ declare module 'azdata' {
}
export interface DeclarativeTableColumn {
headerCssStyles?: { [key: string]: string };
rowCssStyles?: { [key: string]: string };
headerCssStyles?: CssStyles;
rowCssStyles?: CssStyles;
ariaLabel?: string;
showCheckAll?: boolean;
isChecked?: boolean;
}
export enum DeclarativeDataType {
component = 'component'
}
export type DeclarativeTableRowSelectedEvent = {
row: number
};
export interface DeclarativeTableComponent extends Component, DeclarativeTableProperties {
onRowSelected: vscode.Event<DeclarativeTableRowSelectedEvent>;
}
/*
* Add optional azureAccount for connectionWidget.
*/
@@ -295,6 +304,21 @@ declare module 'azdata' {
}
export interface DeclarativeTableProperties extends ComponentProperties {
/**
* dataValues will only be used if data is an empty array
*/
dataValues?: DeclarativeTableCellValue[][];
/**
* Should the table react to user selections
*/
selectEffect?: boolean; // Defaults to false
}
export interface DeclarativeTableCellValue {
value: string | number | boolean;
ariaLabel?: string;
style?: CssStyles
}
export interface ComponentProperties {