diff --git a/packages/builder/src/database/DatabaseRoot.svelte b/packages/builder/src/database/DatabaseRoot.svelte
index 51edd71cf3..4aa85237b3 100644
--- a/packages/builder/src/database/DatabaseRoot.svelte
+++ b/packages/builder/src/database/DatabaseRoot.svelte
@@ -9,7 +9,11 @@
import DropdownButton from "../common/DropdownButton.svelte"
import ActionButton from "../common/ActionButton.svelte"
import Modal from "../common/Modal.svelte"
- import { CreateEditRecordModal } from "./ModelDataTable/modals"
+ import {
+ CreateEditRecordModal,
+ CreateEditModelModal,
+ CreateEditViewModal,
+ } from "./ModelDataTable/modals"
let modalOpen
let selectedRecord
@@ -18,10 +22,14 @@
selectedRecord = record
modalOpen = true
}
+
+ $: recordOpen = $store.currentNode && $store.currentNode.type === 'record'
+ $: viewOpen = $store.currentNode && $store.currentNode.type === 'index'