From 8149ad848f503a1028eb04e79656e73096091148 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Fri, 16 Oct 2020 15:16:29 +0100 Subject: [PATCH] Add new DetailScreenSelect component for selecting only detail screens and update detail linking in grids --- .../userInterface/DetailScreenSelect.svelte | 49 +++++++++++++++++++ .../userInterface/temporaryPanelStructure.js | 6 +-- .../src/DataGrid/Component.svelte | 8 +-- .../src/DataGrid/ViewDetails/Cell.svelte | 7 +-- .../src/DataGrid/customRenderer.js | 13 +++-- 5 files changed, 63 insertions(+), 20 deletions(-) create mode 100644 packages/builder/src/components/userInterface/DetailScreenSelect.svelte diff --git a/packages/builder/src/components/userInterface/DetailScreenSelect.svelte b/packages/builder/src/components/userInterface/DetailScreenSelect.svelte new file mode 100644 index 0000000000..1e2908ab54 --- /dev/null +++ b/packages/builder/src/components/userInterface/DetailScreenSelect.svelte @@ -0,0 +1,49 @@ + + +
+ + + {/each} + +
+ + diff --git a/packages/builder/src/components/userInterface/temporaryPanelStructure.js b/packages/builder/src/components/userInterface/temporaryPanelStructure.js index cb35d140c4..a24d101f5d 100644 --- a/packages/builder/src/components/userInterface/temporaryPanelStructure.js +++ b/packages/builder/src/components/userInterface/temporaryPanelStructure.js @@ -6,6 +6,7 @@ import TableViewSelect from "components/userInterface/TableViewSelect.svelte" import TableViewFieldSelect from "components/userInterface/TableViewFieldSelect.svelte" import Event from "components/userInterface/EventsEditor/EventPropertyControl.svelte" import ScreenSelect from "components/userInterface/ScreenSelect.svelte" +import DetailScreenSelect from "components/userInterface/DetailScreenSelect.svelte" import { IconSelect } from "components/userInterface/IconSelect" import Colorpicker from "@budibase/colorpicker" @@ -328,10 +329,9 @@ export default { control: TableViewSelect, }, { - label: "Table URL", + label: "Detail URL", key: "detailUrl", - placeholder: "tableName", - control: ScreenSelect, + control: DetailScreenSelect, }, { label: "Editable", diff --git a/packages/standard-components/src/DataGrid/Component.svelte b/packages/standard-components/src/DataGrid/Component.svelte index 9930f90aca..0d80990513 100644 --- a/packages/standard-components/src/DataGrid/Component.svelte +++ b/packages/standard-components/src/DataGrid/Component.svelte @@ -94,7 +94,7 @@ sortable: false, cellRenderer: getRenderer({ type: "_id", - options: detailUrl, + options: { detailUrl }, }), autoHeight: true, pinned: "left", @@ -179,15 +179,9 @@