1
0
Fork 0
mirror of synced 2024-07-02 13:01:09 +12:00

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 ff0fe2cba5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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>