mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-25 09:35:37 -05:00
Table Designer - Save Changes feature and Editor related features (#17335)
* table designer add/remove row support * save changes and editor support * address comments * fix build error * including missing change * lower case request name
This commit is contained in:
@@ -17,7 +17,7 @@ export interface ButtonColumnOptions extends IconColumnOptions {
|
||||
/**
|
||||
* Whether to show the text.
|
||||
*/
|
||||
showText?: boolean
|
||||
showText?: boolean;
|
||||
}
|
||||
|
||||
export class ButtonColumn<T extends Slick.SlickData> extends BaseClickableColumn<T> {
|
||||
@@ -33,7 +33,10 @@ export class ButtonColumn<T extends Slick.SlickData> extends BaseClickableColumn
|
||||
formatter: (row: number, cell: number, value: any, columnDef: Slick.Column<T>, dataContext: T): string => {
|
||||
const iconValue = getIconCellValue(this.options, dataContext);
|
||||
const escapedTitle = escape(iconValue.title ?? '');
|
||||
const iconCssClasses = iconValue.iconCssClass ? `codicon icon slick-plugin-icon ${iconValue.iconCssClass}` : '';
|
||||
let iconCssClasses = '';
|
||||
if (iconValue.iconCssClass) {
|
||||
iconCssClasses = this.options.isFontIcon ? iconValue.iconCssClass : `codicon icon slick-plugin-icon ${iconValue.iconCssClass}`;
|
||||
}
|
||||
const buttonTypeCssClass = this.options.showText ? 'slick-plugin-button slick-plugin-text-button' : 'slick-plugin-button slick-plugin-image-only-button';
|
||||
const buttonText = this.options.showText ? escapedTitle : '';
|
||||
return `<button tabindex=-1 class="${iconCssClasses} ${buttonTypeCssClass}" title="${escapedTitle}" aria-label="${escapedTitle}">${buttonText}</button>`;
|
||||
|
||||
@@ -140,6 +140,11 @@ export interface IconColumnOptions extends BaseTableColumnOptions {
|
||||
* The title for all the cells. If the 'field' is provided, the cell values will overwrite this value.
|
||||
*/
|
||||
title?: string
|
||||
|
||||
/**
|
||||
* Whether the icon is font icon. If true, no other class names will be auto appended.
|
||||
*/
|
||||
isFontIcon?: boolean;
|
||||
}
|
||||
|
||||
export interface IconCellValue {
|
||||
|
||||
@@ -426,4 +426,8 @@ export class Table<T extends Slick.SlickData> extends Widget implements IDisposa
|
||||
public set ariaLabel(value: string) {
|
||||
this._tableContainer.setAttribute('aria-label', value);
|
||||
}
|
||||
|
||||
public get container(): HTMLElement {
|
||||
return this._tableContainer;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user