From 09c7824c8e28ea5d77ea6241a3bcef26c897a190 Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Mon, 30 Mar 2020 11:57:22 +0100 Subject: [PATCH] improved backend drilldown paths --- .../src/database/ModelDataTable/ModelDataTable.svelte | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/builder/src/database/ModelDataTable/ModelDataTable.svelte b/packages/builder/src/database/ModelDataTable/ModelDataTable.svelte index 9a9a81b86f..6ac539282c 100644 --- a/packages/builder/src/database/ModelDataTable/ModelDataTable.svelte +++ b/packages/builder/src/database/ModelDataTable/ModelDataTable.svelte @@ -11,6 +11,7 @@ map, remove, keys, + takeRight } from "lodash/fp" import Select from "../../common/Select.svelte" import { getIndexSchema } from "../../common/core" @@ -78,8 +79,8 @@ function drillIntoRecord(record) { backendUiStore.update(state => { + state.breadcrumbs = [...state.breadcrumbs, record.type, record.id] state.selectedRecord = record - state.breadcrumbs = [state.selectedDatabase.name, record.id] state.selectedView = childViewsForRecord($store.hierarchy)[0] return state }) @@ -94,7 +95,7 @@
-

{last($backendUiStore.breadcrumbs)}

+

{takeRight(2, $backendUiStore.breadcrumbs).join(" / ")}