macro preview

This commit is contained in:
Jan Prochazka
2020-10-31 09:04:59 +01:00
parent d243e8cee5
commit cc385c12ec
8 changed files with 201 additions and 7 deletions

View File

@@ -0,0 +1,17 @@
import { FreeTableModel, MacroDefinition, MacroSelectedCell, runMacro } from '@dbgate/datalib';
import Grider from '../datagrid/Grider';
export default class MacroPreviewGrider extends Grider {
model: FreeTableModel;
constructor(model: FreeTableModel, macro: MacroDefinition, macroArgs: {}, selectedCells: MacroSelectedCell[]) {
super();
this.model = runMacro(macro, macroArgs, model, true, selectedCells);
}
getRowData(index: any) {
return this.model.rows[index];
}
get rowCount() {
return this.model.rows.length;
}
}