mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
add check for selection model in edit data (#2517)
This commit is contained in:
committed by
Karl Burtram
parent
8887fe1eac
commit
c73af4c480
@@ -36,14 +36,18 @@ export class RowNumberColumn<T> implements Slick.Plugin<T> {
|
|||||||
private handleClick(e: MouseEvent, args: Slick.OnClickEventArgs<T>): void {
|
private handleClick(e: MouseEvent, args: Slick.OnClickEventArgs<T>): void {
|
||||||
if (this.grid.getColumns()[args.cell].id === 'rowNumber') {
|
if (this.grid.getColumns()[args.cell].id === 'rowNumber') {
|
||||||
this.grid.setActiveCell(args.row, 1);
|
this.grid.setActiveCell(args.row, 1);
|
||||||
this.grid.setSelectedRows([args.row]);
|
if (this.grid.getSelectionModel()) {
|
||||||
|
this.grid.setSelectedRows([args.row]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private handleHeaderClick(e: MouseEvent, args: Slick.OnHeaderClickEventArgs<T>): void {
|
private handleHeaderClick(e: MouseEvent, args: Slick.OnHeaderClickEventArgs<T>): void {
|
||||||
if (args.column.id === 'rowNumber') {
|
if (args.column.id === 'rowNumber') {
|
||||||
this.grid.setActiveCell(0, 1);
|
this.grid.setActiveCell(0, 1);
|
||||||
this.grid.setSelectedRows(range(this.grid.getDataLength()));
|
if (this.grid.getSelectionModel()) {
|
||||||
|
this.grid.setSelectedRows(range(this.grid.getDataLength()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user