macro - previre modified cells

This commit is contained in:
Jan Prochazka
2020-10-31 10:29:10 +01:00
parent 68cf397473
commit 4593ab7c46
7 changed files with 39 additions and 16 deletions

View File

@@ -40,6 +40,7 @@ export default function FreeTableGridCore(props) {
grider={grider}
display={display}
onSelectionChanged={macroPreview ? handleSelectionChanged : null}
frameSelection={!!macroPreview}
/>
);
}

View File

@@ -1,5 +1,5 @@
import { FreeTableModel, MacroDefinition, MacroSelectedCell, runMacro } from '@dbgate/datalib';
import Grider from '../datagrid/Grider';
import Grider, { GriderRowStatus } from '../datagrid/Grider';
export default class MacroPreviewGrider extends Grider {
model: FreeTableModel;
@@ -8,6 +8,14 @@ export default class MacroPreviewGrider extends Grider {
this.model = runMacro(macro, macroArgs, model, true, selectedCells);
}
getRowStatus(index): GriderRowStatus {
const row = this.model.rows[index];
return {
status: 'regular',
modifiedFields: row ? row.__modifiedFields : null,
};
}
getRowData(index: any) {
return this.model.rows[index];
}