Skip to content

Commit

Permalink
fix(client): hide action list on editing for state-field editor (#513)
Browse files Browse the repository at this point in the history
  • Loading branch information
KurumiRin authored Jul 11, 2024
1 parent 55c91b4 commit c3d4464
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions packages/applet/src/components/state/StateFieldViewer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -203,17 +203,15 @@ async function submitDrafting() {
{{ normalizedDisplayedKey }}
</span>
<span mx1>:</span>
<StateFieldInputEditor v-if="editing" v-model="editingText" :custom-type="raw.customType" @cancel="toggleEditing" @submit="submit" />
<template v-if="!editing">
<span :class="stateFormatClass" class="flex whitespace-nowrap">
<span class="flex" v-html="normalizedDisplayedValue" />
</span>
<StateFieldEditor
:hovering="isHovering" :disable-edit="state.disableEdit"
:data="data" :depth="depth" @enable-edit-input="toggleEditing"
@add-new-prop="addNewProp"
/>
</template>
<StateFieldInputEditor v-if="editing" v-model="editingText" class="mr-1" :custom-type="raw.customType" @cancel="toggleEditing" @submit="submit" />
<span :class="stateFormatClass" class="flex whitespace-nowrap">
<span class="flex" v-html="normalizedDisplayedValue" />
</span>
<StateFieldEditor
:hovering="isHovering" :disable-edit="state.disableEdit || editing"
:data="data" :depth="depth" @enable-edit-input="toggleEditing"
@add-new-prop="addNewProp"
/>
</div>
<div v-if="hasChildren && expanded.includes(`${depth}-${index}`)">
<ChildStateViewer :data="normalizedDisplayedChildren" :depth="depth" :index="index" />
Expand Down

0 comments on commit c3d4464

Please sign in to comment.