Studio: fix path

This commit is contained in:
Pieter Vander Vennet 2024-08-02 19:15:12 +02:00
parent 5d1c93396d
commit aece3d4d68
3 changed files with 5 additions and 6 deletions

View file

@ -193,13 +193,12 @@
{/if}
</QuestionPreview>
{:else if schema.hints.types}
<SchemaBasedMultiType {state} path={fusePath(i, [])} schema={schemaForMultitype()} />
<SchemaBasedMultiType {state} {path} schema={schemaForMultitype()} />
{:else}
{#each subparts as subpart}
<SchemaBasedInput
{state}
path={fusePath(i, [subpart.path.at(-1)])}
schema={subpart}
{path}
/>
{/each}
{/if}

View file

@ -92,14 +92,14 @@ export abstract class EditJsonState<T> {
await this.server.update(id, config, this.category)
})
this.messages = this.createMessagesStore()
this.register(["credits"], this.osmConnection.userDetails.mapD(u => u.name), false)
this.register(["credits:uid"], this.osmConnection.userDetails.mapD(u => u.uid), false)
}
public startSavingUpdates(enabled = true) {
this.sendingUpdates = enabled
this.register(["credits"], this.osmConnection.userDetails.mapD(u => u.name), false)
this.register(["credits:uid"], this.osmConnection.userDetails.mapD(u => u.uid), false)
if (enabled) {
this.configuration.ping()
}

View file

@ -92,7 +92,7 @@
<ShowConversionMessage {message} />
{/each}
{/if}
{:else if subparts.length === 0}
{:else if subparts.length === 0}
<!-- We need an array of values, so we use the typehint of the _parent_ element as field -->
{#each $currentValue as value, i}
<div class="flex w-full">