diff --git a/packages/builder/src/components/database/ModelDataTable/modals/CreateEditView.svelte b/packages/builder/src/components/database/ModelDataTable/modals/CreateEditView.svelte index aeab7f8ce7..fa08b7b90c 100644 --- a/packages/builder/src/components/database/ModelDataTable/modals/CreateEditView.svelte +++ b/packages/builder/src/components/database/ModelDataTable/modals/CreateEditView.svelte @@ -18,7 +18,7 @@ SHARD: "Shard Name", } - let index + let view let indexableModels = [] let currentSnippetEditor = SNIPPET_EDITORS.MAP @@ -26,8 +26,8 @@ map(node => ({ node, isallowed: - index.allowedModelNodeIds && - index.allowedModelNodeIds.some(id => node.nodeId === id), + view.allowedModelNodeIds && + view.allowedModelNodeIds.some(id => node.nodeId === id), })), filter(hierarchyFunctions.isModel), filter(hierarchyFunctions.isDecendant($store.currentNode.parent())), @@ -35,17 +35,17 @@ ) store.subscribe($store => { - index = $store.currentNode + view = $store.currentNode indexableModels = indexableModelsFromIndex($store.hierarchy) }) const toggleAllowedModel = model => { if (model.isallowed) { - index.allowedModelNodeIds = index.allowedModelNodeIds.filter( + view.allowedModelNodeIds = view.allowedModelNodeIds.filter( id => id !== model.node.nodeId ) } else { - index.allowedModelNodeIds.push(model.node.nodeId) + view.allowedModelNodeIds.push(model.node.nodeId) } } @@ -61,12 +61,12 @@ {/if}
- +
@@ -95,11 +95,11 @@ {/each} {#if currentSnippetEditor === SNIPPET_EDITORS.MAP} - + {:else if currentSnippetEditor === SNIPPET_EDITORS.FILTER} - + {:else if currentSnippetEditor === SNIPPET_EDITORS.SHARD} - + {/if}