Add a few missed instantiation service usages (#17554)

* Add a few missed instantiation service usages

* remove unused
This commit is contained in:
Charles Gagnon
2021-11-01 14:32:37 -07:00
committed by GitHub
parent 6dda9392e0
commit 25711acde0
2 changed files with 5 additions and 6 deletions

View File

@@ -478,7 +478,7 @@ export abstract class GridTableBase<T> extends Disposable implements IView {
this.rowNumberColumn = new RowNumberColumn({ numberOfRows: this.resultSet.rowCount });
let copyHandler = new CopyKeybind<T>();
copyHandler.onCopy(e => {
new CopyResultAction(CopyResultAction.COPY_ID, CopyResultAction.COPY_LABEL, this.configurationService, false).run(this.generateContext());
this.instantiationService.createInstance(CopyResultAction, CopyResultAction.COPY_ID, CopyResultAction.COPY_LABEL, false).run(this.generateContext());
});
this.columns.unshift(this.rowNumberColumn.getColumnDefinition());
let tableOptions: Slick.GridOptions<T> = {
@@ -814,8 +814,8 @@ export abstract class GridTableBase<T> extends Disposable implements IView {
actions.push(new Separator());
}
actions.push(
new CopyResultAction(CopyResultAction.COPY_ID, CopyResultAction.COPY_LABEL, this.configurationService, false),
new CopyResultAction(CopyResultAction.COPYWITHHEADERS_ID, CopyResultAction.COPYWITHHEADERS_LABEL, this.configurationService, true)
this.instantiationService.createInstance(CopyResultAction, CopyResultAction.COPY_ID, CopyResultAction.COPY_LABEL, false),
this.instantiationService.createInstance(CopyResultAction, CopyResultAction.COPYWITHHEADERS_ID, CopyResultAction.COPYWITHHEADERS_LABEL, true)
);
if (this.state.canBeMaximized) {