Skip to content

Commit

Permalink
fix: draft reactivity
Browse files Browse the repository at this point in the history
  • Loading branch information
maybeanerd committed Apr 7, 2024
1 parent e0f14c9 commit 48c04f0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions components/publish/PublishWidgetList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ const {
dialogLabelledBy?: string
}>()
const { threadItems } = useThreadComposer(draftKey, initial)
const threadItems = computed(() =>
useThreadComposer(draftKey, initial).threadItems.value,
)
onDeactivated(() => {
clearEmptyDrafts()
Expand All @@ -34,7 +36,7 @@ function isFirstItem(index: number) {
<template>
<template v-if="isHydrated && currentUser">
<PublishWidget
v-for="(_, index) in threadItems" :key="index"
v-for="(_, index) in threadItems" :key="`${draftKey}-${index}`"
:draft-key="draftKey"
:draft-item-index="index"
:expanded="isFirstItem(index) ? expanded : true"
Expand Down

0 comments on commit 48c04f0

Please sign in to comment.