mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
Fix context menus in grids (#2245)
* fix context menus * fix edit data context menu
This commit is contained in:
committed by
Karl Burtram
parent
173842510c
commit
a8f21b56f0
@@ -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 {
|
||||||
|
|||||||
@@ -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">
|
||||||
|
|||||||
Reference in New Issue
Block a user