<script>
import { getContext } from "svelte";
import { get } from "svelte/store";
const appState = getContext("ApplicationStateStore");
const document = getContext("DocumentStore");
const item = get(document);
let currentState = item.toObject();
delete currentState['_id'];
function updateDocument() {
item.update(currentState);
}
</script>
<div>
<div class="form-control">
<label>Category</label>
<input bind:value={currentState.system.category} on:change={updateDocument} type="text"/>
</div>
</div>
<script>
import { getContext } from "svelte";
import { get } from "svelte/store";
const appState = getContext("ApplicationStateStore");
const document = getContext("DocumentStore");
const item = get(document);
let currentState = item.toObject();
delete currentState['_id'];
function updateDocument() {
item.update(currentState);
}
</script>
<div>
<div class="form-control">
<label>Category</label>
<input bind:value={currentState.system.category} on:change={updateDocument} type="text"/>
</div>
</div>