ZanzibarNuclear / nuxt-won

World of nuclear app using Nuxt framework
0 stars 0 forks source link

Sorting content parts - duplicate sequence number #94

Closed ZanzibarNuclear closed 5 months ago

ZanzibarNuclear commented 5 months ago

When you bubble up a new content part from last to earlier in the sequence, the next two parts end up sharing a sequence number.

ZanzibarNuclear commented 5 months ago

Seems to be fixed.

  1. Gathered database updates into await Promise.all so they happen at once.
  2. Reference in HTML content part component was not getting refreshed. Added onUpdated() lifecycle method.

Note: a few components use reactive({}) instead of ref({}), which seems better. Definitely different behavior, though not quite sure how. Could be similar issue with other content part components. Something to understand better, then refactor to be consistent.