make table keyboard shortcuts configurable (#22582)

* make table keyboard shortcuts configurable

* fix error

* new slickgrid version

* add comment

* tree grid
This commit is contained in:
Alan Ren
2023-04-03 13:21:00 -07:00
committed by GitHub
parent 38a3312cb6
commit 61b3285eaf
38 changed files with 275 additions and 87 deletions

View File

@@ -55,6 +55,7 @@ import { timeout } from 'vs/base/common/async';
import { onUnexpectedError } from 'vs/base/common/errors';
import { IAccessibilityService } from 'vs/platform/accessibility/common/accessibility';
import { IQuickInputService } from 'vs/platform/quickinput/common/quickInput';
import { ITableService } from 'sql/workbench/services/table/browser/tableService';
export interface IDesignerStyle {
tabbedPanelStyles?: ITabbedPanelStyles;
@@ -117,7 +118,8 @@ export class Designer extends Disposable implements IThemable {
@IThemeService private readonly _themeService: IThemeService,
@IContextMenuService private readonly _contextMenuService: IContextMenuService,
@IAccessibilityService private readonly _accessibilityService: IAccessibilityService,
@IQuickInputService private readonly _quickInputService: IQuickInputService) {
@IQuickInputService private readonly _quickInputService: IQuickInputService,
@ITableService private readonly _tableService: ITableService) {
super();
this._tableCellEditorFactory = new TableCellEditorFactory(
{
@@ -1026,6 +1028,7 @@ export class Designer extends Disposable implements IThemable {
currentTableActions.forEach(a => a.updateState());
table.grid.setSelectedRows([]);
});
this._register(this._tableService.registerTable(table));
component = table;
break;
default:

View File

@@ -39,6 +39,7 @@ import { MenuItemAction, MenuRegistry } from 'vs/platform/actions/common/actions
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
import { IAccessibilityService } from 'vs/platform/accessibility/common/accessibility';
import { IQuickInputService } from 'vs/platform/quickinput/common/quickInput';
import { ITableService } from 'sql/workbench/services/table/browser/tableService';
export enum ColumnSizingMode {
ForceFit = 0, // all columns will be sized to fit in viewable space, no horiz scroll bar
@@ -92,7 +93,8 @@ export default class TableComponent extends ComponentBase<azdata.TableComponentP
@Inject(IContextMenuService) private contextMenuService: IContextMenuService,
@Inject(IInstantiationService) private instantiationService: IInstantiationService,
@Inject(IAccessibilityService) private accessibilityService: IAccessibilityService,
@Inject(IQuickInputService) private quickInputService: IQuickInputService
@Inject(IQuickInputService) private quickInputService: IQuickInputService,
@Inject(ITableService) private tableService: ITableService
) {
super(changeRef, el, logService);
}
@@ -295,6 +297,7 @@ export default class TableComponent extends ComponentBase<azdata.TableComponentP
args: e
});
}));
this._register(this.tableService.registerTable(this._table));
}
this.baseInit();
}