Skip to content

Commit e31b34a

Browse files
committed
fix: remove loader from "save fields" while data is fetching
1 parent 30c62ce commit e31b34a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

custom/VisionAction.vue

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
<Button
5454
class="w-full md:w-64"
5555
@click="saveData"
56-
:disabled="isLoading || checkedCount < 1 || isCriticalError"
56+
:disabled="isLoading || checkedCount < 1 || isCriticalError || isFetchingRecords"
5757
:loader="isLoading"
5858
>
5959
{{ checkedCount > 1 ? 'Save fields' : 'Save field' }}
@@ -105,6 +105,7 @@ const isAiResponseReceivedImage = ref([]);
105105
const primaryKey = props.meta.primaryKey;
106106
const openGenerationCarousel = ref([]);
107107
const isLoading = ref(false);
108+
const isFetchingRecords = ref(false);
108109
const isError = ref(false);
109110
const isCriticalError = ref(false);
110111
const isImageGenerationError = ref(false);
@@ -129,7 +130,7 @@ const openDialog = async () => {
129130
return acc;
130131
},{[primaryKey]: records.value[i][primaryKey]} as Record<string, boolean>);
131132
}
132-
isLoading.value = true;
133+
isFetchingRecords.value = true;
133134
const tasks = [];
134135
if (props.meta.isFieldsForAnalizeFromImages) {
135136
tasks.push(runAiAction({
@@ -158,7 +159,7 @@ const openDialog = async () => {
158159
fillCarouselSaveImages();
159160
}
160161
161-
isLoading.value = false;
162+
isFetchingRecords.value = false;
162163
}
163164
164165
watch(selected, (val) => {

0 commit comments

Comments
 (0)