diff --git a/extensions/dacpac/src/wizard/pages/selectOperationpage.ts b/extensions/dacpac/src/wizard/pages/selectOperationpage.ts index 060dbaf212..f3011667b3 100644 --- a/extensions/dacpac/src/wizard/pages/selectOperationpage.ts +++ b/extensions/dacpac/src/wizard/pages/selectOperationpage.ts @@ -53,6 +53,7 @@ export class SelectOperationPage extends BasePage { // default have the first radio button checked this.deployRadioButton.checked = true; + this.deployRadioButton.focused = true; this.instance.setDoneButton(Operation.deploy); return true; } diff --git a/src/sql/base/browser/ui/table/plugins/checkboxSelectColumn.plugin.ts b/src/sql/base/browser/ui/table/plugins/checkboxSelectColumn.plugin.ts index e64d01ad2e..f713cb2d10 100644 --- a/src/sql/base/browser/ui/table/plugins/checkboxSelectColumn.plugin.ts +++ b/src/sql/base/browser/ui/table/plugins/checkboxSelectColumn.plugin.ts @@ -42,7 +42,7 @@ const defaultOptions: ICheckboxSelectColumnOptions = { }; const checkboxTemplate = `
- +
`; export class CheckboxSelectColumn implements Slick.Plugin { @@ -99,11 +99,11 @@ export class CheckboxSelectColumn implements Slick.Pl if (!this._options.title) { if (selectedRows.length && selectedRows.length === this._grid.getDataLength()) { this._grid.updateColumnHeader(this._options.columnId!, - strings.format(checkboxTemplate, 'checked'), + strings.format(checkboxTemplate, 'checked', this._options.title), this._options.toolTip); } else { this._grid.updateColumnHeader(this._options.columnId!, - strings.format(checkboxTemplate, ''), + strings.format(checkboxTemplate, '',this._options.title), this._options.toolTip); } } @@ -187,6 +187,9 @@ export class CheckboxSelectColumn implements Slick.Pl this._grid.invalidateRow(row); this._grid.render(); } + + //Ensure that the focus stays correct + this._grid.getActiveCellNode().focus(); } private handleHeaderClick(e: Event, args: Slick.OnHeaderClickEventArgs): void { @@ -207,12 +210,12 @@ export class CheckboxSelectColumn implements Slick.Pl const rows = range(this._grid.getDataLength()); this._grid.setSelectedRows(rows); this._grid.updateColumnHeader(this._options.columnId!, - strings.format(checkboxTemplate, 'checked'), + strings.format(checkboxTemplate, 'checked', this._options.title), this._options.toolTip); } else { this._grid.setSelectedRows([]); this._grid.updateColumnHeader(this._options.columnId!, - strings.format(checkboxTemplate, ''), this._options.toolTip); + strings.format(checkboxTemplate, '', this._options.title), this._options.toolTip); e.stopPropagation(); e.stopImmediatePropagation(); } @@ -222,7 +225,7 @@ export class CheckboxSelectColumn implements Slick.Pl public getColumnDefinition(): Slick.Column { return { id: this._options.columnId, - name: this._options.title || strings.format(checkboxTemplate, ''), + name: this._options.title || strings.format(checkboxTemplate, '', ''), toolTip: this._options.toolTip, field: 'sel', width: this._options.width, @@ -240,16 +243,16 @@ export class CheckboxSelectColumn implements Slick.Pl } return this._selectedRowsLookup[row] - ? strings.format(checkboxTemplate, 'checked') - : strings.format(checkboxTemplate, ''); + ? strings.format(checkboxTemplate, 'checked', this._options.title) + : strings.format(checkboxTemplate, '', this._options.title); } checkboxTemplateCustom(row: number): string { // use state after toggles if (this._useState) { return this._selectedCheckBoxLookup[row] - ? strings.format(checkboxTemplate, 'checked') - : strings.format(checkboxTemplate, ''); + ? strings.format(checkboxTemplate, 'checked', this._options.title) + : strings.format(checkboxTemplate, '', this._options.title); } // use data for first time rendering @@ -257,11 +260,11 @@ export class CheckboxSelectColumn implements Slick.Pl let rowVal = (this._grid) ? this._grid.getDataItem(row) : null; if (rowVal && this._options.title && rowVal[this._options.title] === true) { this._selectedCheckBoxLookup[row] = true; - return strings.format(checkboxTemplate, 'checked'); + return strings.format(checkboxTemplate, 'checked', this._options.title); } else { delete this._selectedCheckBoxLookup[row]; - return strings.format(checkboxTemplate, ''); + return strings.format(checkboxTemplate, '', this._options.title); } } diff --git a/src/sql/workbench/browser/modelComponents/table.component.ts b/src/sql/workbench/browser/modelComponents/table.component.ts index 475afba560..d7f4e99b70 100644 --- a/src/sql/workbench/browser/modelComponents/table.component.ts +++ b/src/sql/workbench/browser/modelComponents/table.component.ts @@ -229,9 +229,7 @@ export default class TableComponent extends ComponentBase implements IComponent, this._table.setSelectedRows(this.selectedRows); } - for (const col of this._checkboxColumns) { - this.registerCheckboxPlugin(col); - } + Object.keys(this._checkboxColumns).forEach(col => this.registerCheckboxPlugin(this._checkboxColumns[col])); if (this.ariaRowCount === -1) { this._table.removeAriaRowCount();