diff options
author | Bob Zeleznik <zzzman@gmail.com> | 2019-12-12 00:43:12 -0500 |
---|---|---|
committer | Bob Zeleznik <zzzman@gmail.com> | 2019-12-12 00:43:12 -0500 |
commit | c11e175790a6eb1b1e51157cd14f92480434fff1 (patch) | |
tree | 804d4f024cfb05960ea8673b58f2235008289588 /src | |
parent | 00a4fd713bcf12eb621fde78f0bb8fb5a680fa04 (diff) |
fixed makeTemplate
Diffstat (limited to 'src')
-rw-r--r-- | src/client/util/DropConverter.ts | 4 | ||||
-rw-r--r-- | src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/client/util/DropConverter.ts b/src/client/util/DropConverter.ts index b2c720d5d..349d5d7e3 100644 --- a/src/client/util/DropConverter.ts +++ b/src/client/util/DropConverter.ts @@ -10,8 +10,8 @@ import { ScriptField } from "../../new_fields/ScriptField"; function makeTemplate(doc: Doc): boolean { const layoutDoc = doc.layout instanceof Doc && doc.layout.isTemplateField ? doc.layout : doc; - const layout = StrCast(layoutDoc.layout).match(/fieldKey={"[^"]*"}/)![0]; - const fieldKey = layout.replace('fieldKey={"', "").replace(/"}$/, ""); + const layout = StrCast(layoutDoc.layout).match(/fieldKey={'[^"]*'}/)![0]; + const fieldKey = layout.replace("fieldKey={'", "").replace(/'}$/, ""); const docs = DocListCast(layoutDoc[fieldKey]); let any = false; docs.map(d => { diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx index 81d8d467b..ddfb52ba9 100644 --- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx +++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx @@ -723,6 +723,7 @@ export class CollectionFreeFormView extends CollectionSubView(PanZoomDocument) { } componentDidMount() { + super.componentDidMount(); this._layoutComputeReaction = reaction(() => { TraceMobx(); return this.doLayoutComputation; }, action((computation: { elements: ViewDefResult[] }) => computation && (this._layoutElements = computation.elements)), { fireImmediately: true, name: "doLayout" }); |