Merge pull request #176 from shogunpurple/ui-updates

improved backend drilldown paths
This commit is contained in:
Joe 2020-03-30 13:41:48 +01:00 committed by GitHub
commit ab123aa098
1 changed files with 3 additions and 2 deletions

View File

@ -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 @@
<section>
<div class="table-controls">
<h4 class="budibase__title--3">{last($backendUiStore.breadcrumbs)}</h4>
<h4 class="budibase__title--3">{takeRight(2, $backendUiStore.breadcrumbs).join(" / ")}</h4>
<Select icon="ri-eye-line" bind:value={$backendUiStore.selectedView}>
{#each views as view}
<option value={view}>{view.name}</option>