Compare commits

...

4 Commits

Author SHA1 Message Date
Karl Burtram
d10e08e63e Update SQL Ops Studio to 0.32.4 2018-08-16 17:35:54 -07:00
Anthony Dresser
a8f21b56f0 Fix context menus in grids (#2245)
* fix context menus

* fix edit data context menu
2018-08-16 20:34:52 -04:00
Karl Burtram
173842510c Bump yarn.lock package reference (#2248) 2018-08-16 20:33:19 -04:00
Alan Ren
19c08fe0eb Alanren/fixfor1782 (#2247)
* fix for issue #1782, refresh the cached data

* pick up the latest version of slickgrid and tools service
2018-08-16 16:54:07 -07:00
7 changed files with 32 additions and 24 deletions

View File

@@ -1,6 +1,6 @@
{ {
"downloadUrl": "https://github.com/Microsoft/sqltoolsservice/releases/download/v{#version#}/microsoft.sqltools.servicelayer-{#fileName#}", "downloadUrl": "https://github.com/Microsoft/sqltoolsservice/releases/download/v{#version#}/microsoft.sqltools.servicelayer-{#fileName#}",
"version": "1.5.0-alpha.22", "version": "1.5.0-alpha.27",
"downloadFileNames": { "downloadFileNames": {
"Windows_86": "win-x86-netcoreapp2.1.zip", "Windows_86": "win-x86-netcoreapp2.1.zip",
"Windows_64": "win-x64-netcoreapp2.1.zip", "Windows_64": "win-x64-netcoreapp2.1.zip",

View File

@@ -1,6 +1,6 @@
{ {
"name": "sqlops", "name": "sqlops",
"version": "0.32.4", "version": "0.32.5",
"distro": "8c3e97e3425cc9814496472ab73e076de2ba99ee", "distro": "8c3e97e3425cc9814496472ab73e076de2ba99ee",
"author": { "author": {
"name": "Microsoft Corporation" "name": "Microsoft Corporation"
@@ -34,7 +34,7 @@
"@angular/router": "~4.1.3", "@angular/router": "~4.1.3",
"@angular/upgrade": "~4.1.3", "@angular/upgrade": "~4.1.3",
"angular2-grid": "2.0.6", "angular2-grid": "2.0.6",
"angular2-slickgrid": "github:Microsoft/angular2-slickgrid#1.4.1", "angular2-slickgrid": "github:Microsoft/angular2-slickgrid#1.4.3",
"applicationinsights": "0.18.0", "applicationinsights": "0.18.0",
"chart.js": "^2.6.0", "chart.js": "^2.6.0",
"fast-plist": "0.1.2", "fast-plist": "0.1.2",

View File

@@ -457,9 +457,11 @@ export class EditDataComponent extends GridParentComponent implements OnInit, On
} }
} finally { } finally {
// The operation may fail if there were no changes sent to the service to revert, // The operation may fail if there were no changes sent to the service to revert,
// so clear any existing client-side edit and refresh the table regardless // so clear any existing client-side edit and refresh on-screen data
// do not refresh the whole dataset as it will move the focus away to the first row.
//
this.currentEditCellValue = null; this.currentEditCellValue = null;
this.refreshResultsets(); this.dataSet.dataRows.resetWindowsAroundIndex(this.currentCell.row);
} }
} }
} }

View File

@@ -228,8 +228,12 @@ export abstract class GridParentComponent {
protected getSelection(index?: number): ISlickRange[] { protected getSelection(index?: number): ISlickRange[] {
let selection = this.slickgrids.toArray()[index || this.activeGrid].getSelectedRanges(); let selection = this.slickgrids.toArray()[index || this.activeGrid].getSelectedRanges();
selection = selection.map(c => { return <ISlickRange>{ fromCell: c.fromCell - 1, toCell: c.toCell - 1, toRow: c.toRow, fromRow: c.fromRow }; }); if (selection) {
return selection; selection = selection.map(c => { return <ISlickRange>{ fromCell: c.fromCell - 1, toCell: c.toCell - 1, toRow: c.toRow, fromRow: c.fromRow }; });
return selection;
} else {
return undefined;
}
} }
private copySelection(): void { private copySelection(): void {

View File

@@ -15,19 +15,20 @@
(focusin)="onGridFocus()" (focusout)="onGridFocusout()"> (focusin)="onGridFocus()" (focusout)="onGridFocusout()">
<div class="boxRow content horzBox slickgrid" *ngFor="let dataSet of renderedDataSets; let i = index" <div class="boxRow content horzBox slickgrid" *ngFor="let dataSet of renderedDataSets; let i = index"
[style.max-height]="dataSet.maxHeight" [style.min-height]="dataSet.minHeight"> [style.max-height]="dataSet.maxHeight" [style.min-height]="dataSet.minHeight">
<slick-grid #slickgrid id="slickgrid_{{i}}" [columnDefinitions]="dataSet.columnDefinitions" <slick-grid #slickgrid id="slickgrid_{{i}}"
[ngClass]="i === activeGrid ? 'active' : ''" class="boxCol content vertBox slickgrid"
[dataRows]="dataSet.dataRows" enableAsyncPostRender="true"
(contextMenu)="openContextMenu($event, dataSet.batchId, dataSet.resultId, i)" showHeader="true"
enableAsyncPostRender="true" [columnDefinitions]="dataSet.columnDefinitions"
showHeader="true" [ngClass]="i === activeGrid ? 'active' : ''"
[resized]="dataSet.resized" [dataRows]="dataSet.dataRows"
(onActiveCellChanged)="onActiveCellChanged(i)" [resized]="dataSet.resized"
(mousedown)="navigateToGrid(i)" [selectionModel]="selectionModel"
[selectionModel]="selectionModel" [plugins]="plugins[i]"
[plugins]="plugins[i]" [rowHeight]="rowHeight"
class="boxCol content vertBox slickgrid" (onContextMenu)="openContextMenu($event, dataSet.batchId, dataSet.resultId, i)"
[rowHeight]="rowHeight"> (onActiveCellChanged)="onActiveCellChanged(i)"
(mousedown)="navigateToGrid(i)">
</slick-grid> </slick-grid>
<span class="boxCol content vertBox"> <span class="boxCol content vertBox">
<div class="boxRow content maxHeight" *ngFor="let icon of dataIcons"> <div class="boxRow content maxHeight" *ngFor="let icon of dataIcons">

View File

@@ -57,6 +57,7 @@ export interface IObservableCollection<T> {
at(index: number): T; at(index: number): T;
getRange(start: number, end: number): T[]; getRange(start: number, end: number): T[];
setCollectionChangedCallback(callback: (change: CollectionChange, startIndex: number, count: number) => void): void; setCollectionChangedCallback(callback: (change: CollectionChange, startIndex: number, count: number) => void): void;
resetWindowsAroundIndex(index: number): void;
} }
export class CancellationToken { export class CancellationToken {
private _isCanceled; private _isCanceled;
@@ -291,7 +292,7 @@ export class VirtualizedCollection<TData> implements IObservableCollection<TData
getRange(start: number, end: number): TData[]; getRange(start: number, end: number): TData[];
private getRangeFromCurrent(start, end); private getRangeFromCurrent(start, end);
private getDataFromCurrent(index); private getDataFromCurrent(index);
private resetWindowsAroundIndex(index); resetWindowsAroundIndex(index);
} }
} }
declare module 'angular2-slickgrid/out/js/virtualizedCollection' { declare module 'angular2-slickgrid/out/js/virtualizedCollection' {

View File

@@ -174,9 +174,9 @@ angular2-grid@2.0.6:
version "2.0.6" version "2.0.6"
resolved "https://registry.yarnpkg.com/angular2-grid/-/angular2-grid-2.0.6.tgz#01fe225dc13b2822370b6c61f9a6913b3a26f989" resolved "https://registry.yarnpkg.com/angular2-grid/-/angular2-grid-2.0.6.tgz#01fe225dc13b2822370b6c61f9a6913b3a26f989"
"angular2-slickgrid@github:Microsoft/angular2-slickgrid#1.4.1": "angular2-slickgrid@github:Microsoft/angular2-slickgrid#1.4.3":
version "1.4.1" version "1.4.3"
resolved "https://codeload.github.com/Microsoft/angular2-slickgrid/tar.gz/e13c098aa50f43de21a5fdcd1a1a0263455b92d6" resolved "https://codeload.github.com/Microsoft/angular2-slickgrid/tar.gz/a9801217a1b25ee2bf001cacfd9edf4cbb6992d2"
ansi-colors@^1.0.1: ansi-colors@^1.0.1:
version "1.1.0" version "1.1.0"