From ac8385be469c51ca592b57b5dd27abf9582611c8 Mon Sep 17 00:00:00 2001 From: Michael Shanks Date: Thu, 27 Feb 2020 11:56:39 +0000 Subject: [PATCH] bugfix: compnent template fixes --- .../src/Templates/indexDatatable.js | 9 +++++++++ .../src/Templates/recordForm.js | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/packages/materialdesign-components/src/Templates/indexDatatable.js b/packages/materialdesign-components/src/Templates/indexDatatable.js index 0a201db75a..798a9061ba 100644 --- a/packages/materialdesign-components/src/Templates/indexDatatable.js +++ b/packages/materialdesign-components/src/Templates/indexDatatable.js @@ -33,6 +33,15 @@ const tableProps = (index, indexSchema) => ({ ], }, ], + onLoad: [ + { + "##eventHandlerType": "List Records", + parameters: { + indexKey: "/all_contacts", + statePath: "all_contacts" + } + } + ] }) const columnHeaders = indexSchema => diff --git a/packages/materialdesign-components/src/Templates/recordForm.js b/packages/materialdesign-components/src/Templates/recordForm.js index 25a040470c..c41c52b147 100644 --- a/packages/materialdesign-components/src/Templates/recordForm.js +++ b/packages/materialdesign-components/src/Templates/recordForm.js @@ -12,7 +12,7 @@ const outerContainer = record => ({ { "##eventHandlerType": "Get New Record", parameters: { - collectionKey: record.collectionKey, + collectionKey: record.collectionNodeKey(), childRecordType: record.name, statePath: record.name, },