Skip to content

Commit

Permalink
fix(client): hide state field display on edit (#507)
Browse files Browse the repository at this point in the history
Co-authored-by: Loot Nurakhmetov <[email protected]>
  • Loading branch information
Lootjs and Loot Nurakhmetov authored Jul 9, 2024
1 parent 0e780f7 commit 81719c5
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions packages/applet/src/components/state/StateFieldViewer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -204,14 +204,16 @@ async function submitDrafting() {
</span>
<span mx1>:</span>
<StateFieldInputEditor v-if="editing" v-model="editingText" :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"
:data="data" :depth="depth" @enable-edit-input="toggleEditing"
@add-new-prop="addNewProp"
/>
<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>
</div>
<div v-if="hasChildren && expanded.includes(`${depth}-${index}`)">
<ChildStateViewer :data="normalizedDisplayedChildren" :depth="depth" :index="index" />
Expand Down

0 comments on commit 81719c5

Please sign in to comment.