From d916de9b7f9c64f904e64776bd0a5abae220a65e Mon Sep 17 00:00:00 2001 From: Michael Shanks Date: Mon, 12 Oct 2020 14:48:30 +0100 Subject: [PATCH] Settings >URL select handles Record detail urls --- .../builderStore/fetchBindableProperties.js | 2 + .../userInterface/ScreenSelect.svelte | 68 ++++++++++++++++++- .../userInterface/temporaryPanelStructure.js | 6 +- 3 files changed, 70 insertions(+), 6 deletions(-) diff --git a/packages/builder/src/builderStore/fetchBindableProperties.js b/packages/builder/src/builderStore/fetchBindableProperties.js index 92359ae630..fbb3b1b30c 100644 --- a/packages/builder/src/builderStore/fetchBindableProperties.js +++ b/packages/builder/src/builderStore/fetchBindableProperties.js @@ -90,6 +90,8 @@ const contextToBindables = (models, walkResult) => context => { runtimeBinding: `${contextParentPath}data.${key}`, // how the binding exressions looks to the user of the builder readableBinding: `${context.instance._instanceName}.${model.name}.${key}`, + // model / view info + model: context.model, }) // see ModelViewSelect.svelte for the format of context.model diff --git a/packages/builder/src/components/userInterface/ScreenSelect.svelte b/packages/builder/src/components/userInterface/ScreenSelect.svelte index 412f0719fc..baff9a782b 100644 --- a/packages/builder/src/components/userInterface/ScreenSelect.svelte +++ b/packages/builder/src/components/userInterface/ScreenSelect.svelte @@ -1,18 +1,80 @@ + {#each urls as url} + {/each} diff --git a/packages/builder/src/components/userInterface/temporaryPanelStructure.js b/packages/builder/src/components/userInterface/temporaryPanelStructure.js index 3f853efcfb..b628e86e2e 100644 --- a/packages/builder/src/components/userInterface/temporaryPanelStructure.js +++ b/packages/builder/src/components/userInterface/temporaryPanelStructure.js @@ -356,7 +356,7 @@ export default { { label: "destinationUrl", key: "destinationUrl", - control: Input, + control: ScreenSelect, placeholder: "/table/_id", }, ], @@ -405,7 +405,7 @@ export default { { label: "Link Url", key: "linkUrl", - control: Input, + control: ScreenSelect, placeholder: "Link URL", }, { @@ -480,7 +480,7 @@ export default { { label: "Link Url", key: "linkUrl", - control: Input, + control: ScreenSelect, placeholder: "Link URL", }, {