Skip to content
This repository has been archived by the owner on Jun 12, 2024. It is now read-only.

Commit

Permalink
fix: loading causing stale data to present in form(#650)
Browse files Browse the repository at this point in the history
  • Loading branch information
hay-kot authored Dec 1, 2023
1 parent 321a83b commit 4d9131b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions frontend/pages/item/[id]/index/edit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@
const labelStore = useLabelStore();
const labels = computed(() => labelStore.labels);
const { data: nullableItem, refresh } = useAsyncData(async () => {
const {
data: nullableItem,
refresh,
pending: requestPending,
} = useAsyncData(async () => {
const { data, error } = await api.items.get(itemId.value);
if (error) {
toast.error("Failed to load item");
Expand Down Expand Up @@ -450,7 +454,7 @@
Delete
</BaseButton>
</div>
<div class="space-y-6">
<div v-if="!requestPending" class="space-y-6">
<BaseCard class="overflow-visible">
<template #title> Edit Details </template>
<template #title-actions>
Expand Down

0 comments on commit 4d9131b

Please sign in to comment.