diff options
| author | Sam Wilkins <abdullah_ahmed@brown.edu> | 2019-07-30 21:24:45 -0400 |
|---|---|---|
| committer | Sam Wilkins <abdullah_ahmed@brown.edu> | 2019-07-30 21:24:45 -0400 |
| commit | a28a3b79f81e82e4b3368c0e87d3a56c694cc3b4 (patch) | |
| tree | e27d3fa55d42e8d156ba5ee8140d0771b3a04734 /src/client/views/collections/CollectionSchemaCells.tsx | |
| parent | a5646ecb3eac0a6cf8cfa9a915ea56b399106ef4 (diff) | |
added undo to schema
Diffstat (limited to 'src/client/views/collections/CollectionSchemaCells.tsx')
| -rw-r--r-- | src/client/views/collections/CollectionSchemaCells.tsx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/client/views/collections/CollectionSchemaCells.tsx b/src/client/views/collections/CollectionSchemaCells.tsx index 61f21006e..4ff65b277 100644 --- a/src/client/views/collections/CollectionSchemaCells.tsx +++ b/src/client/views/collections/CollectionSchemaCells.tsx @@ -26,6 +26,7 @@ import { faExpand } from '@fortawesome/free-solid-svg-icons'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { SchemaHeaderField } from "../../../new_fields/SchemaHeaderField"; import { KeyCodes } from "../../northstar/utils/KeyCodes"; +import { undoBatch } from "../../util/UndoManager"; library.add(faExpand); @@ -96,6 +97,7 @@ export class CollectionSchemaCell extends React.Component<CellProps> { if (typeof field === "object" && doc) this.props.setPreviewDoc(doc); } + @undoBatch applyToDoc = (doc: Doc, row: number, col: number, run: (args?: { [name: string]: any }) => any) => { const res = run({ this: doc, $r: row, $c: col, $: (r: number = 0, c: number = 0) => this.props.getField(r + row, c + col) }); if (!res.success) return false; |
