move store init to component instance, svelte-forms need to be updated before it can use the store correctly in the context module script tag

This commit is contained in:
kevmodrome 2020-08-03 17:08:54 +02:00
parent dfc64cdde9
commit 43ee2726e2
No known key found for this signature in database
GPG Key ID: E8F9CD141E63BF38
1 changed files with 3 additions and 6 deletions

View File

@ -1,11 +1,6 @@
<script context="module">
// Init store here so that it doesn't get destroyed and removed when the component instance is destroyed. This is to make sure no data is lost if the user closes the model
<script>
import { writable } from "svelte/store"
export const createAppStore = writable({ currentStep: 0, values: {} })
</script>
<script>
import { store, workflowStore, backendUiStore } from "builderStore"
import { string, object } from "yup"
import api, { get } from "builderStore/api"
@ -22,6 +17,8 @@
import analytics from "../../analytics"
const { open, close } = getContext("simple-modal")
//Move this to context="module" once svelte-forms is updated so that it can bind to stores correctly
const createAppStore = writable({ currentStep: 0, values: {} })
export let hasKey