mirror of
https://github.com/hay-kot/homebox.git
synced 2024-11-22 08:35:43 +00:00
fix: loading causing stale data to present in form(#650)
This commit is contained in:
parent
321a83b634
commit
4d9131ba7e
1 changed files with 6 additions and 2 deletions
|
@ -23,7 +23,11 @@
|
||||||
const labelStore = useLabelStore();
|
const labelStore = useLabelStore();
|
||||||
const labels = computed(() => labelStore.labels);
|
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);
|
const { data, error } = await api.items.get(itemId.value);
|
||||||
if (error) {
|
if (error) {
|
||||||
toast.error("Failed to load item");
|
toast.error("Failed to load item");
|
||||||
|
@ -450,7 +454,7 @@
|
||||||
Delete
|
Delete
|
||||||
</BaseButton>
|
</BaseButton>
|
||||||
</div>
|
</div>
|
||||||
<div class="space-y-6">
|
<div v-if="!requestPending" class="space-y-6">
|
||||||
<BaseCard class="overflow-visible">
|
<BaseCard class="overflow-visible">
|
||||||
<template #title> Edit Details </template>
|
<template #title> Edit Details </template>
|
||||||
<template #title-actions>
|
<template #title-actions>
|
||||||
|
|
Loading…
Reference in a new issue