mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-03-06 11:01:37 -05:00
reverting row which escape is clicked and fixed the issue with reverting rows (#1333)
* reverting row which escape is clicked and fixed the issue with reverting row
This commit is contained in:
@@ -203,10 +203,12 @@ export class EditDataComponent extends GridParentComponent implements OnInit, On
|
|||||||
return (index: number): void => {
|
return (index: number): void => {
|
||||||
// Force focus to the first cell (completing any active edit operation)
|
// Force focus to the first cell (completing any active edit operation)
|
||||||
self.focusCell(index, 0, false);
|
self.focusCell(index, 0, false);
|
||||||
|
this.currentEditCellValue = null;
|
||||||
// Perform a revert row operation
|
// Perform a revert row operation
|
||||||
self.dataService.revertRow(index)
|
self.dataService.revertRow(index)
|
||||||
.then(() => self.refreshResultsets());
|
.then(() => {
|
||||||
|
self.refreshResultsets();
|
||||||
|
});
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -415,6 +417,10 @@ export class EditDataComponent extends GridParentComponent implements OnInit, On
|
|||||||
this.newRowVisible = false;
|
this.newRowVisible = false;
|
||||||
});
|
});
|
||||||
handled = true;
|
handled = true;
|
||||||
|
} else if (e.keyCode === jQuery.ui.keyCode.ESCAPE) {
|
||||||
|
this.currentEditCellValue = null;
|
||||||
|
this.onRevertRow()(this.currentCell.row);
|
||||||
|
handled = true;
|
||||||
}
|
}
|
||||||
return handled;
|
return handled;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user